When I execute a
git svn fetch
from my repository, it returns nothing and doesn\'t update even though there are new commits under svn.
git svn fetch
only copies new revisions to your local object database, very much like git fetch
– both only synchronize object databases. It will not update your branch and working copy. To get the newly fetched changes into your branch, use git svn rebase
; it will re-apply all your local changes on top of the latest svn revision.
git svn rebase
will do a fast-forward when there are no local commits, so it should not mess with history. Alternatively you could use git merge --ff-only git-svn
to fast-forward to the most recent svn revision (and abort when it is not fast-forwardable, i.e. not a direct descendant)
You should only use git svn reset
when upstream svn has changed history (svndump/svnadmin) and you need to re-fetch the new commits, but this should almost never happen (otherwise blame the admin!)