[clug] Git help please - I might be breaking branches

Alex Satrapa grail at goldweb.com.au
Mon Mar 23 02:15:02 GMT 2009


Working on tickets in Trac, I've been doing this:

> # Have you ever danced with Subversion by the pale moonlight?
> git svn fetch
> git svn rebase
> git svn dcommit
>
> # At this point I expect my SVN and git repositories are in sync.
> # I have a ticket #123 that I want to work on
>
> git checkout -b ticket-123
>
> # do stuff to fix the problem reported in ticket-123
> git add <stuff that changed>
> git commit -m "Changed stuff. Fixes #123."
>
> git switch svn-trunk
> git merge ticket-123
>
> # Dance with SVN again
> git svn fetch
> git svn rebase
> git svn dcommit
>
> # At this point I have the repositories in sync again, the ticket
> # in Trac was closed during the post-commit hooks on Subversion,
> # and the world is happy... almost:
>
> git branch
>
> svn-trunk
> ticket-1
> ticket-2
> ticket-3
> ...
> ticket-123

When I try to delete the branch, I get this:

> [alex at here]# git branch -d ticket-123
> error: The branch 'ticket-123' is not an ancestor of your current  
> HEAD.
> If you are sure you want to delete it, run 'git branch -D ticket-119'.

Now while I'm sure that I want to delete ticket-123, and I'm  
absolutely certain that the changes incurred by ticket-123 have been  
merged into svn-trunk and are working ... what have I done (or not  
done) that is causing git to freak out?

There are no outstanding changes in ticket-123 branch (I committed,  
then immediately merged that branch into svn-trunk), and I have the  
lingering sense of doom that I have forgotten some magic incantation  
to make git work for me. Am I going to wake up tomorrow to find that I  
am git's gimp?

Or is it safe to "-D" delete the branch and hope that everything just  
works like I expect it to? I want to keep the history around, I just  
don't want my list of branches to grow infinitely.

Alex

-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 220 bytes
Desc: This is a digitally signed message part
Url : http://lists.samba.org/archive/linux/attachments/20090323/01b32613/PGP.bin


More information about the linux mailing list