The advantage of .gitignore is that it can be checked in the repository itself, unlike .git/info/exclude . Another advantage is that you can have multiple .gitignore files, one inside each directory / subdirectory for ignore rules for a particular directory, as opposed to .git/info/exclude .
So .gitignore is available for all repository clones. Therefore, in large teams, all people ignore files of the same type Example *.db , *.log . And you may have more specific ignore rules due to multiple .gitignore .
.git/info/exclude is available only for individual clones, so what one person ignores in his clone is not available in the frame of another person. For example, if someone uses Eclipse for development, it might make sense for this developer to add the .build folder to .git/info/exclude , because other developers may not use Eclipse.
In general, file / ignore rules that should be completely ignored should go to .gitignore , otherwise files that you want to ignore only on the local clone should go to .git/info/exclude
mu 無 Apr 07 '14 at 8:15 2014-04-07 08:15
source share