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.
我有本地更改和远程更改。
有人告诉我,我必须先推,然后拉。这背后有什么原因吗?
那个人错了:正确的模式是正确的pull-before-you-push,而不是相反的。
pull-before-you-push
当你pull,git将获取提交origin并尝试fast-forward在它们之上进行本地提交,进行合并。之后,您可以push通过这种方式不会与其他更新产生冲突。
pull
git
origin
fast-forward
push