我試圖pull origin a
。如何忽略已經在git中跟蹤的文件
去以下:
error: Your local changes to the following files would be overwritten by merge:
src/.cproject
src/.project
src/navigate/navigate_main.c
Please, commit your changes or stash them before you can merge.
Aborting
git的狀態顯示:
modified: .gitignore
modified: src/.cproject
modified: src/.project
modified: src/navigate/navigate_main.c
我做git rm --cached src/.project
前3,和stashed
第四
我再次拉和unstashed我變化。
但是當我做pull origin a
我得到:
M .gitignore
U src/.cproject
M src/navigate/navigate_main.c
Pull is not possible because you have unmerged files.
Please, fix them up in the work tree, and then use 'git add/rm <file>'
as appropriate to mark resolution, or use 'git commit -a'.
如何清潔這種一勞永逸?
您修改了文件,這些文件與服務器上的文件不同。首先合併這些文件。然後提交。然後拉。 –