I want to automatically exclude 2 files from committing, that are part of the git repository but have some changes, that shouldn't be part of the github repo, because they have some changes that are only meaningful to my local system and not the other developers.
I added them to
.git/info/exclude in the hopes git understands that he shouldn't commit changes to them:
# git ls-files --others --exclude-from=.git/info/exclude # Lines that start with '#' are comments. # For a project mostly in C, the following would be a good set of # exclude patterns (uncomment them if you want to use them): # *.[oa] a.conf b.conf # *~
git status still lists them as staged for committing:
# On branch master # Changes to be committed: # (use "git reset HEAD <file>..." to unstage) # # modified: build/conf/a.conf # modified: build/conf/b.conf #
I don't want to unstage them regularly with every commit (one time I might just forget), how can I do that?