On Tue, Mar 29, 2011 at 9:51 AM, Thomas Ferris Nicolaisen <tfn...@gmail.com> wrote: > > Yes, this is true. By default, you'll get a lot of stale branches in your > fetching repo. > For the time being, I've ignored this. I regularly clean it up. Say I have a > mirror of a svn repo with trunk, tags/1.0 and a branch branches/1.0.x: > Fetching repo: > tfnico:~/git-repos/website-fetching/>git branch -a > * master > remotes/1.0-x > remotes/tags/1.0 > remotes/trunk > > Bare repo: > tfnico:~/git-repos/website.git/>git branch > 1.0-x > tags/1.0 > trunk > > Notice the 1.0-x branch. > Now I remove the branch in SVN: > svn rm file:///Users/tfnico/svn-repos/main/website/branches/1.0-x > > I run sync in the fetching repo: > > tfnico:~/git-repos/website-fetching/>git svn fetch;git push origin > Everything up-to-date > So, nothing changed there. The deletion of the branch was not propagated, and > the 1.0-x branch still present. > I now start cleaning up by removing it in the fetching repo: > tfnico:~/git-repos/website-fetching/>rm .git/refs/remotes/1.0-x > tfnico:~/git-repos/website-fetching/>git branch -a > * master > remotes/tags/1.0 > remotes/trunk > > Now sync again: > tfnico:~/git-repos/website-fetching/>git svn fetch;git push origin > Everything up-to-date > So, the branch is not recreated. Now clean up in the bare repo: > tfnico:~/git-repos/website.git/>rm refs/heads/1.0-x > tfnico:~/git-repos/website.git/>git branch > rm > tags/1.0 > trunk > > Now, branch is gone is forever, unless we later on do a full git svn clone > (which recreates all previous branches, also the removed ones). > > It's a bit messy, but think of it as manual maintenance you just have to do > once in a while.
Thanks. I will have to do it this way. -- Sabba - סבא הלל - Hillel Hillel (Sabba) Markowitz | Said the fox to the fish, "Join me ashore" sabbahil...@gmail.com | The fish are the Jews, Torah is our water http://sabbahillel.blogspot.com -- You received this message because you are subscribed to the Google Groups "Git for human beings" group. To post to this group, send email to git-users@googlegroups.com. To unsubscribe from this group, send email to git-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/git-users?hl=en.