Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/github/3.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 执行rebase将replays主分支提交添加到我的Pull请求中_Git_Github_Git Pull - Fatal编程技术网

Git 执行rebase将replays主分支提交添加到我的Pull请求中

Git 执行rebase将replays主分支提交添加到我的Pull请求中,git,github,git-pull,Git,Github,Git Pull,我有一个pull请求,当我执行“git rebase”时,它在pull请求中添加了我没有编写的提交。我正在合并的遥控器在所有这些提交之前,所以我不明白他们为什么要进入公共关系。你知道如何撤销这一点,或者将来如何防止这一点吗 这就是我所做的 # Checkout local branch and apply changes mkdir /home/yaroslavvb/tfimmediate_fresh cd /home/yaroslavvb/tfimmediate_fresh git clone

我有一个pull请求,当我执行“git rebase”时,它在pull请求中添加了我没有编写的提交。我正在合并的遥控器在所有这些提交之前,所以我不明白他们为什么要进入公共关系。你知道如何撤销这一点,或者将来如何防止这一点吗

这就是我所做的

# Checkout local branch and apply changes
mkdir /home/yaroslavvb/tfimmediate_fresh
cd /home/yaroslavvb/tfimmediate_fresh
git clone https://github.com/yaroslavvb/tensorflow.git
cd tensorflow
git checkout tfimmediate_fresh
# do my modifications
git commit -m "Changes"

# Rebase against main branch
git remote add tfmain https://github.com/tensorflow/tensorflow.git
git fetch tfmain
git rebase tfmain/master

# fix conflicts
git add tensorflow/contrib/__init__.py
git rebase --continue
git pull
# fix conflicts again
git add tensorflow/contrib/__init__.py
git commit -m "Fix merge conflicts"
git push
git push -f

在此之后,我的拉取请求包含主分支中的更改,这些更改不是我在重定基址时编写的

,您在您的
git重定基址之后执行了
git拉取--continue

这将把来自源/主分支的新提交与本地分支合并,因此将合并的提交包含在拉请求中


在重定基址之后,您应该将更改推送到将用于拉取请求的分支。

重定基址时,您在您的
git重定基址之后执行了
git拉取--

这将把来自源/主分支的新提交与本地分支合并,因此将合并的提交包含在拉请求中


重新设置基址后,您只需将更改推送到将用于拉取请求的分支。

欢迎每次我重新设置基址时来到我的生活。希望将来我们都能通过听奥利弗的话而不是拉扯来避免这种情况 欢迎来到我的生活,每次我都会重新设定基准。希望将来我们都能通过听奥利弗的话而不是拉扯来避免这种情况。