I’m totally new to git and want to create a repository in a directory that has existing .svn folders and compiled folders bin and obj. After running init on a directory, what is the command to ignore these folders? I’m using GitBash on Windows.
Share
Simplest and shareable way is to create a file called .gitignore in the project’s root directory with this content:
You can do that quickly from the command line with:
Commit your .gitignore file to the repo, and everyone can benefit from it. Alternately, add .gitignore to the .gitignore file, and it will be ignored as well. Note that if this is a clone of an SVN repo, you can also use
git svn create-ignoreorgit svn show-ignore. The former will reads the svn:ignore property and creates matching .gitignore files in all the appropriate directories. I prefer the latter, which lists out all the “ignore patterns” in a format that can be appended to a root .gitignore file.