Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/git/22.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
git拉取导致冲突_Git - Fatal编程技术网

git拉取导致冲突

git拉取导致冲突,git,Git,我做了一个git拉原点newbranch:newbranch。。。但是出于某种原因。。这试图将我原籍的newbranch与本地的master合并。。这导致了冲突。。1) 如何撤消完成了一半的合并?2) 如何将原始的newbranch拉至本地回购协议中名为“newbranch”的新分支机构使用此选项重置回合并前状态: git reset --merge (或者如果您使用的是在--merge可用之前的git版本,请使用--hard) 然后创建并签出分支,然后拉入并合并到其中: git checko

我做了一个git拉原点newbranch:newbranch。。。但是出于某种原因。。这试图将我原籍的newbranch与本地的master合并。。这导致了冲突。。1) 如何撤消完成了一半的合并?2) 如何将原始的newbranch拉至本地回购协议中名为“newbranch”的新分支机构使用此选项重置回合并前状态:

git reset --merge
(或者如果您使用的是在
--merge
可用之前的git版本,请使用
--hard

然后创建并签出分支,然后拉入并合并到其中:

git checkout -b newbranch
git pull origin newbranch
当然,您将得到与以前完全相同的冲突,因为您正在合并到同一个提交中