不想更改.gitignore,因爲其他人需要回購中的文件。但我有我自己的副本,我想使用。如何保留我的本地版本的文件,而不使用.gitignore?
我編輯.git/info/exclude
,並添加以下內容:
/Gemfile
/Gemfile.lock
/config/database.yml
/spec/spec_helper.rb
這似乎並沒有做任何事情。 git status
還表示:
# Changes not staged for commit:
# (use "git add <file>..." to update what will be committed)
# (use "git checkout -- <file>..." to discard changes in working directory)
#
# modified: Gemfile
# modified: Gemfile.lock
# modified: config/database.yml
# modified: spec/spec_helper.rb
是什麼讓我的本地文件的版本不使用的.gitignore的最佳方式?
這是你可以使用[Keyword Expansion](http://git-scm.com/book/ch7-2.html#Keyword-Expansion)的東西嗎? – R0MANARMY 2012-08-16 02:09:41