且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

解决GIT中的冲突或避免冲突?

更新时间:2022-06-25 06:11:00

我们应该使用分支来单独工作吗?

Should we be using branches to work separately?

是:他应该做一个 git pull --rebase (对于尚未推送的分支),在推送其更改之前,此时您已经可以将其分支合并为简单的快进合并.
另请参见合并与重新设置

Yes: he should have done a git pull --rebase (for a branch not yet pushed), before pushing his changes, at which point you would have been able to merge his branch as a simple fast-forward merge.
See also merge vs. rebase and a similar blog post.

(摘自 Git是你的朋友而不是敌人Vol.4:变基础)

一般来说,是的,在推送之前在本地合并.

More generally, yes, merge locally before pushing.