由于无法跟踪.gitignore而无法进行git pull

时间:2018-12-09 10:36:44

标签: git gitignore pull

执行后: git pull origin master

我得到以下信息:

* branch            master     -> FETCH_HEAD
error: The following untracked working tree files would be overwritten by merge:
.gitignore
Please move or remove them before you merge.

Aborting

我如何继续?

1 个答案:

答案 0 :(得分:1)

输出告诉您您尚未提交更改。

您可以执行以下任一操作:

add & commit进行更改:

# Add and commit changes
git add . && git commit -m"Message"

要放弃更改:

# discard your changes
git checkout -- .gitignore