我想从提交中自动排除2个文件,这些文件是git存储库的一部分,但有一些更改,不应包含在github存储库中,因为它们有一些更改仅对我的本地系统有意义,而对其他系统没有意义开发人员。
我添加了它们,.git/info/exclude
希望git理解他不应该对它们进行更改:
# 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
仍将其列为提交阶段:
# On branch master
# Changes to be committed:
# (use "git reset HEAD <file>..." to unstage)
#
# modified: build/conf/a.conf
# modified: build/conf/b.conf
#
我不想每次提交都定期取消登台(一次我可能会忘记),我该怎么做?
.gitignore
呢?