Sunday, 5 June 2011

Git ignore file

I just find myself like searching for this again and again as I am not a very heavy git user now, but setting global core.excludesfile seems to be very similar to svn/cvs approach.

How to ignore certain types of files in git?

1) Put the excludes in your $GIT_DIR/info/exclude file (.git/info/exclude), if this is specific to one tree.

2) Run git config --global core.excludesfile ~/.gitignore and add patterns to your ~/.gitignore. This option applies if you want to ignore certain patterns across all trees.

/taken from StackOverflow by Emil

No comments: