Search code examples
gitsvngit-svn

Two git-svn repository clones, new commits doesn't appear


I have a SVN server S1. I fetched repository on two computers PC1 and PC2. I added git commits on PC1 thanks to git commit and then put them to server through svn dcommit. Everything looks fine. Changes are on server. Next i went to PC2 and tried 'git svn fetch'. It fetched last commit(I hope so because terminal output looked like it fetched), but i don't see last commit in log. Also i doesn't see new changes in files.

Maybe the problem is connected with way that i've made my two repositories. Repository on PC1 was made thanks to git svn. But repository on PC2 was a hardcopy(through scp -rf) from PC1.

What it's wrong ?


Solution

  • Hmmm... Now i used git rebase on PC2 and my files changed to the newest revision that i posted yesterday on PC1. Interesting.

    Ok so this was a solution. To update repo on PC2 with changes made on PC1 I have to

    git svn fetch
    git stash
    git svn rebase
    git stash apply
    

    Edit : Yes, only git svn rebase does it's job!