Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
新手 Git 问题:我在 bitbucket 上设置了一个 repo。我 git 获取了其他人的更改,并希望将它们与我自己的合并。但是,当我尝试 git merge(或 git merge origin/master)时,我收到消息“错误:您对以下文件的本地更改将被合并覆盖:”,然后是我已更改的文件列表。让 Git 合并这些更改正是我想要做的。
您可以在进行合并之前提交更改,也可以将它们存储起来:
git stash git merge origin/master git stash pop
如果要保留更改,可以先将更改提交到本地存储库,然后合并远程存储库。