Update git-svn list of remote branches

Viewed 12725

When I have to use svn, I use git-svn to talk to svn. I cloned the repo with the standard git svn clone -s line, and all the remote branches at the time were there.

Since then, a new branch has been created, but not by me. I want to checkout/track this branch locally. I can track a branch that I can see (with git branch -r) like so:

git checkout -t -b dev remotes/development

But this doesn't work with the other branch, since it doesn't show up in git branch -r

How can I track this missing branch?

3 Answers

After running the following commands, you'll be able to see the new branch on the git side:

$ git svn fetch
$ git svn rebase

Make sure your branch is clean first.

git svn rebase --fetch-all will tackle it, refer to the man page:

This fetches revisions from the SVN parent of the current HEAD and rebases the current (uncommitted to SVN) work against it.

[...]

This works similarly to svn update or git pull

[...]

This accepts all options that git svn fetch and git rebase accept. However, --fetch-all only fetches from the current [svn-remote], and not all [svn-remote] definitions.

:i: BUT it fetches all svn copies / branches

Related