git-svn rebase and dcommit problem

前端 未结 4 1755
余生分开走
余生分开走 2021-02-09 03:09
git version 1.7.1
svn, version 1.6.12
Ubuntu 10.10

I have just git and I have used svn. But I haven\'t used then together. I had a git repository, and

相关标签:
4条回答
  • 2021-02-09 03:49

    After resolving your conflicts you need to run git rebase --continue before running git svn dcommit

    0 讨论(0)
  • 2021-02-09 04:12

    No a complete answer, but what seems certain is that:

    *(no branch)
    

    means you end up in a DETACHED HEAD mode which you see in a git svn context in "Can I recover lost commits in a SVN repository using a local tracking git-svn branch?".
    See also "Why did git detach my head?".

    So make sure:

    • at each step you are not in a detached HEAD (no branch)
    • that you dcommit a branch which exists in your SVN repo (and not a pure local Git branch)
    0 讨论(0)
  • 2021-02-09 04:13

    I'm running into a similar problem, likely because I pushed to my git remote before pushing to the SVN remote and thus messed up my git history. It seems like each time I try to commit something to svn, git tries to replay ALL my previous commits even though they already exist in svn, so I just do git rebase --skip until I get back to the latest commit, but the easiest solution is probably to just clone a fresh git svn.

    0 讨论(0)
  • 2021-02-09 04:14

    Did you use the Google instructions here to import your git repo to svn? I had a similar error after using those instructions: the initial import went fine, but something went wrong somewhere down the line and I couldn't push subsequent commits.

    I resolved it by just git svn init-ing a fresh git repo to track my svn repo.

    0 讨论(0)
提交回复
热议问题