我正在尝试将错误修复推送到pandas github存储库。在推送之前,我必须执行以下命令,以确保我的主分支已更新:
# go to the master branch
git checkout master
# pull changes from github
git fetch upstream
# update the master branch
git rebase upstream/master
# push it to your Github repo
git push然后,我更新本地分支:
# go to the feature branch
git checkout my-new-feature
# make a backup in case you mess up
git branch tmp my-new-feature
# rebase on master
git rebase mastergit rebase master失败,因为存在要解决的冲突。为了解决这些问题,我使用了git mergetool,我将它与Meld联系在一起,这是一个显示本地(左)、基本(中)和远程(右)文件的开源工具。

在这种情况下,我在本地文件中有一些远程文件中没有的代码。我没有添加该代码,所以我假设当我在我的本地分支上工作时,代码已经被上游的合并删除了。因此,我会选择从本地删除代码,以便本地、基本和远程对齐。

现在,上面的图片怎么样?上次我试图从远程文件中获取更改,但是当我在GitHub上推送我的更改时,添加的空格看起来不是来自远程文件,但我添加了它们。我是否误解了远程、本地和基本的含义?
对我来说,REMOTE是上行版本,本地是我正在处理的本地文件,并且基于部分合并git能够继续,但需要一些手动干预才能完成。
如何执行手动合并?我会从遥控器上拿到所有东西,除了我个人所做的改变。
让我怀疑我最初对本地和远程是什么的理解的是下面的图片。

我编写了右侧突出显示的代码
- ``concat`` will now use existing Series names if provided (:issue:`10698`).
.. ipython:: python
foo = pd.Series([1,2], name='foo')
bar = pd.Series([1,2])
baz = pd.Series([4,5])
Previous Behavior:
.. code-block:: python
In [1] pd.concat([foo, bar, baz], 1)
Out[1]:
0 1 2
0 1 1 4
1 2 2 5
New Behavior:
.. ipython:: python
pd.concat([foo, bar, baz], 1)那么为什么是在远程而不是本地呢?我希望它在本地文件中,而不是在远程文件中,因为它还没有被合并到上游。
发布于 2015-08-30 16:57:28
正如我在"git rebase, keeping track of 'local' and 'remote'“中提到的那样
git checkout A
git rebase B # rebase A on top of B您必须:
B,B(我们的和他们的在rebase期间颠倒)
因此,在GUI mergetool上下文中:
https://stackoverflow.com/questions/32294805
复制相似问题