Created
January 24, 2011 16:06
-
-
Save matthewmccullough/793430 to your computer and use it in GitHub Desktop.
Recursively ignore a target directory in Git
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| git init testrecursiveignore | |
| cd testrecursiveignore | |
| mkdir target | |
| echo buildjunk > target/build1.log | |
| mkdir -p subproject/target | |
| echo buildjunk > subproject/target/build2.log | |
| echo //HelloWorld >> code/mycode.java | |
| git add code/mycode.java | |
| git commit -m'Adding code' | |
| echo target >> .gitignore | |
| git add .gitignore | |
| git commit -m'Ignoring all target folders recursively' | |
| ## All target files or folders are recursively ignored |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment