不能拉或合并git。 “工作副本有一些未经修改的变化”

时间:2016-06-15 06:27:15

标签: git

如何修复拉动问题。 当我从xcode中取出然后它会给出错误" 无法拉动工作副本有未完成的更改"

1 个答案:

答案 0 :(得分:1)

您必须提交或存储代码。

1。提交

如果您有更改并且无法提取,则只需提交更改即可。

# add the desired files to the index
git add .

# commit your changes
git commit -m "Message..."

# now pull your changes
git pull origin <branch>

2。藏匿

# stash your changes and pull them back later on
# add the [-u] flag for untracked files if needed
git stash save <name> 

# pull the new content
git pull origin <branch>

# get back the code which you stashed
git stash pop