永无止境的GIT故事 - 我在这里做错了什么? [英] Never-ending GIT story - what am I doing wrong here?

查看:476
本文介绍了永无止境的GIT故事 - 我在这里做错了什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我希望将本地GIT存储库与远程GIT和SVN存储库同步。



我正在执行的步骤如下:

> git push


所有最新的



> git pull


已经最新。



好吧,我的远程GIT回购似乎目前为止还没有结果。



> git svn rebase

首先,倒带头重播你的作品......

应用:解决一些javadoc问题。

使用索引信息重建基础树...

< stdin>:13:尾随空格

\t

< stdin>:21:尾随空格

\\ \\ t \ t\t\t< configuration>

< stdin>:22:尾随空格

\t\t\t\t\t< links>

< stdin>:23:尾随空格

\t\t\t\t\t\t < ;链接> http://java.sun.com/javase/6/docs/api/< / link>


< stdin> :24:尾随空格

\t\t\t\t\t< / links>

警告:squelched 1空格错误

警告:6 lin es添加空白错误

回退到补丁库和3路合并...

自动合并lilith-parent / pom.xml

为了清晰起见,我用\t替换了标签。



这是我已经完成的合并,以前...

我现在有一个新的本地版本。



> git svn dcommit

[提交新版本到SVN ...再次...]



现在master和trunk都位于本地存储库的头部。



> git push

到ssh://huxhorn@lilith.git.sourceforge.net/gitroot/lilith/lilith < br>
! [被拒绝] master - > master(非快速转发)

错误:无法将某些文件推送到'ssh://huxhorn@lilith.git.sourceforge.net/ gitroot / lilith / lilith'



这意味着AFAIK,我必须先执行一次拉。 Soooo ....

> git pull


已经uptodate!

通过递归合并。



这会让我回到最初的开始...... :(冲洗并重复。)

我有这种感觉,我在这里错过了一些非常重要的观点。任何人都可以向我解释这一点吗? >通过 git-svn 和git通过 push / <$ c $不能跟踪一个分支c> pull 。你应该将这两个分支分开,并在本地同步分支上执行 git rebase / p>

I'd like to get a local GIT repository in sync with both a remote GIT and an SVN repository.

The steps I'm executing are the following:

> git push
Everything up-to-date

> git pull
Already up-to-date.

Alright, my remote GIT repos seems to be fine so far.

> git svn rebase
First, rewinding head to replay your work on top of it...
Applying: Fixing some javadoc problems.
Using index info to reconstruct a base tree...
<stdin>:13: trailing whitespace.
\t
<stdin>:21: trailing whitespace.
\t\t\t\t<configuration>
<stdin>:22: trailing whitespace.
\t\t\t\t\t<links>
<stdin>:23: trailing whitespace.
\t\t\t\t\t\t<link>http://java.sun.com/javase/6/docs/api/</link>
<stdin>:24: trailing whitespace.
\t\t\t\t\t</links>
warning: squelched 1 whitespace error
warning: 6 lines add whitespace errors.
Falling back to patching base and 3-way merge...
Auto-merging lilith-parent/pom.xml
I replaced tabs with \t for clarity.

That's a merge I've already done, previously...
I now have a new local version.

> git svn dcommit
[commits the new version to SVN... again...]

Now master and trunk are both at the head of my local repository.

> git push
To ssh://huxhorn@lilith.git.sourceforge.net/gitroot/lilith/lilith
! [rejected] master -> master (non-fast forward)
error: failed to push some refs to 'ssh://huxhorn@lilith.git.sourceforge.net/gitroot/lilith/lilith'

This means, AFAIK, that I have to execute a pull first. Soooo....

> git pull
Already uptodate!
Merge made by recursive.

which puts me back to the very beginning ... :( Rinse and repeat.

I have the feeling that I'm missing some quite important point here. Can anyone explain this to me?

解决方案

One branch can not be tracked both with svn via git-svn and with git via push/pull. You should make these two branches separate and do git rebase on synced branches locally, when you want to transfer commits between these branches

这篇关于永无止境的GIT故事 - 我在这里做错了什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆