{"thread":{"id":"29484","subject":"git-svn branches with revision id's in name","startedAt":"2012-01-30T19:42:46Z","lastAt":"2012-02-02T19:03:21Z","messageCount":3,"participants":["Stephen Duncan Jr","Carsten Fuchs","Jehan Bing"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"183370","messageId":"CAGYrzvwzrsZdHHnSBaMv-sD9mDGVQ-qFuks+JM6d-NQ9Wz9KwQ@mail.gmail.com","threadId":"29484","inReplyTo":null,"subject":"git-svn branches with revision id's in name","fromName":"Stephen Duncan Jr","fromEmail":"stephen.duncan@gmail.com","sentAt":"2012-01-30T19:42:46Z","receivedAt":"2012-01-30T19:42:46Z","isPatch":false,"sender":{"key":"stephen.duncan@gmail.com","avatar":null},"body":"A project I work on recently changed it's SVN structure, causing me to\ndo a new git svn clone.  The new structure is like this:\n\n{project}/branches/\n  /master\n  /develop\n  /qa\n  /feature\n    /feature1\n    /feature2\n  /release\n    /release1\n    /release2\n  /hotfix\n    /hotfix1\n    /hotfix2\n\nSo I set up my svn-remote sections as follows:\n\n[svn-remote \"svn\"]\n  url = {url}\n  fetch = {project}/branches/master:refs/remotes/trunk\n  fetch = {project}/branches/develop:refs/remotes/develop\n  fetch = {project}/branches/qa:refs/remotes/qa\n  branches = {project}/branches/{feature,release,hotfix}/*:refs/remotes/*/*\n\nThis seems to have worked fine, for the most part, but unlike my\nprevious git-svn checkouts, it has created several branches with\nrevision numbers as part of the name:\n\n$ git branch -a\n* master\n  remotes/develop\n  remotes/develop@29271\n  remotes/develop@32463\n  remotes/develop@34103\n  remotes/feature/xyz\n  remotes/feature/xyz@26438\n  remotes/feature/xyz@27542\n  remotes/feature/xyz@35233\n\nWhy have these remote branches been created?  What impact does this\nhave on my checkout?  Can I remove safely remove them?  How?  I was\nunable to figure out how to reference this behavior in order to search\nfor information on it.\n\n--\nStephen Duncan Jr\nwww.stephenduncanjr.com\n"},{"id":"183596","messageId":"4F2A807B.9050206@T-Online.de","threadId":"29484","inReplyTo":"CAGYrzvwzrsZdHHnSBaMv-sD9mDGVQ-qFuks+JM6d-NQ9Wz9KwQ@mail.gmail.com","subject":"Re: git-svn branches with revision id's in name","fromName":"Carsten Fuchs","fromEmail":"carstenfuchs@t-online.de","sentAt":"2012-02-02T12:24:27Z","receivedAt":"2012-02-02T12:24:27Z","isPatch":false,"sender":{"key":"carstenfuchs@t-online.de","avatar":null},"body":"Hi all,\n\nAm 2012-01-30 20:42, schrieb Stephen Duncan Jr:\n> [...]\n> $ git branch -a\n> * master\n>    remotes/develop\n>    remotes/develop@29271\n>    remotes/develop@32463\n>    remotes/develop@34103\n>    remotes/feature/xyz\n>    remotes/feature/xyz@26438\n>    remotes/feature/xyz@27542\n>    remotes/feature/xyz@35233\n>\n> Why have these remote branches been created?  What impact does this\n> have on my checkout?  Can I remove safely remove them?  How?  I was\n> unable to figure out how to reference this behavior in order to search\n> for information on it.\n\nSame questions here.\n(I know how to remove them, but I'd love to learn and understand why they have been \ncreated.)\n\nAny info would much be appreciated!\n\nMany thanks and best regards,\nCarsten\n\n\n\n-- \n    Cafu - the open-source Game and Graphics Engine\nfor multiplayer, cross-platform, real-time 3D Action\n           Learn more at http://www.cafu.de\n"},{"id":"183631","messageId":"4F2ADDF9.9090507@orb.com","threadId":"29484","inReplyTo":"4F2A807B.9050206@T-Online.de","subject":"Re: git-svn branches with revision id's in name","fromName":"Jehan Bing","fromEmail":"jehan@orb.com","sentAt":"2012-02-02T19:03:21Z","receivedAt":"2012-02-02T19:03:21Z","isPatch":false,"sender":{"key":"jehan@orb.com","avatar":null},"body":"On 2012-02-02 04:24, Carsten Fuchs wrote:\n> Hi all,\n>\n> Am 2012-01-30 20:42, schrieb Stephen Duncan Jr:\n>> [...]\n>> $ git branch -a\n>> * master\n>> remotes/develop\n>> remotes/develop@29271\n>> remotes/develop@32463\n>> remotes/develop@34103\n>> remotes/feature/xyz\n>> remotes/feature/xyz@26438\n>> remotes/feature/xyz@27542\n>> remotes/feature/xyz@35233\n>>\n>> Why have these remote branches been created? What impact does this\n>> have on my checkout? Can I remove safely remove them? How? I was\n>> unable to figure out how to reference this behavior in order to search\n>> for information on it.\n>\n> Same questions here.\n> (I know how to remove them, but I'd love to learn and understand why\n> they have been created.)\n\nThose are branches that have been deleted and then recreated later.\nIn svn, you can always get a deleted branch back by checking out an old \nrevision. But in git, branches are not part of the history, so when you \ndelete a branch, it's completely gone, as if it never existed, taking \nwith it any commit that has not been merged elsewhere.\nTo prevent that loss, git-svn doesn't delete branches. But if the branch \nwas re-created later in svn, you would get a conflict in git. So \ninstead, git-svn rename the old branch by adding the revision number \nwhere the branch last existed, i.e. the revision before it was deleted.\n\nSo in the OP case, the branch \"develop\" was deleted at least 3 times, at \nr34104, r32464 and r29272. The last one may also have been deleted too \nbut then it was not re-created so git-svn didn't rename yet.\n"}]}