{"thread":{"id":"16638","subject":"Can someone confirm what the contents of refs/heads/master means?","startedAt":"2008-12-08T19:23:46Z","lastAt":"2008-12-08T22:21:26Z","messageCount":6,"participants":["davetron5000","Peter Harris","David Copeland","Björn Steinbrink"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"97377","messageId":"f78b0fcc-6165-440a-b76b-b1b0a281b15c@k8g2000yqn.googlegroups.com","threadId":"16638","inReplyTo":null,"subject":"Can someone confirm what the contents of refs/heads/master means?","fromName":"davetron5000","fromEmail":"davetron5000@gmail.com","sentAt":"2008-12-08T19:23:46Z","receivedAt":"2008-12-08T19:23:46Z","isPatch":false,"sender":{"key":"davetron5000@gmail.com","avatar":"https://gravatar.com/avatar/9ec09086e36c4e609dfc23a4582d2c7adf7dc2fb1796f74492d52727efa6ba86?d=mp&s=160"},"body":"I'm using git-svn to interact with an SVN repo that has branches.\n\nAfter my clone via:\n\ngit svn clone $REPO/main -T trunk -b branches -t tags\n\nmy 'master' branch pointed to one of the branches in svn and not to\nthe main trunk. (my .git/config looked correct for svn interaction,\ni.e. trunk pointed to the right place).\n\nSo, I overwrote refs/heads/master with the contents of refs/remotes/\ntrunk (i.e. the SHA-1 of the svn trunk).\n\nThings seem to be working; git svn dcommit commits to the trunk and\ngit svn rebase updates from svn's trunk.\n\nSo, I want to make sure that refs/heads/master actuall does, in fact,\npoint to the head revision of whatever branch is considered \"master\".\nCan someone comfirm this (or provide the actual explanation if I'm\nwrong?)\n\nThanks!\n\nDave\n"},{"id":"97378","messageId":"eaa105840812081135p56eceb97yb968575b11a7f985@mail.gmail.com","threadId":"16638","inReplyTo":"f78b0fcc-6165-440a-b76b-b1b0a281b15c@k8g2000yqn.googlegroups.com","subject":"Re: Can someone confirm what the contents of refs/heads/master means?","fromName":"Peter Harris","fromEmail":"git@peter.is-a-geek.org","sentAt":"2008-12-08T19:35:56Z","receivedAt":"2008-12-08T19:35:56Z","isPatch":false,"sender":{"key":"git@peter.is-a-geek.org","avatar":null},"body":"On Mon, Dec 8, 2008 at 2:23 PM, davetron5000 wrote:\n>\n> So, I overwrote refs/heads/master with the contents of refs/remotes/\n> trunk (i.e. the SHA-1 of the svn trunk).\n>\n> Things seem to be working; git svn dcommit commits to the trunk and\n> git svn rebase updates from svn's trunk.\n>\n> So, I want to make sure that refs/heads/master actuall does, in fact,\n> point to the head revision of whatever branch is considered \"master\".\n\nI do believe so, yes. That, or an entry in packed-refs.\n\n> Can someone comfirm this (or provide the actual explanation if I'm\n> wrong?)\n\nOverwriting internal files by hand feels a little too much like work\nfor my taste. I would have done something more like \"git reset --hard\ntrunk\" (or, if not on master, \"git branch -D master; git branch master\ntrunk\" ), but of course you can feel free to do things the hard way if\nyou prefer. :-)\n\nPeter Harris\n"},{"id":"97380","messageId":"f95d47890812081142k575264fctd77254ed3386a069@mail.gmail.com","threadId":"16638","inReplyTo":"eaa105840812081135p56eceb97yb968575b11a7f985@mail.gmail.com","subject":"Re: Can someone confirm what the contents of refs/heads/master means?","fromName":"David Copeland","fromEmail":"davetron5000@gmail.com","sentAt":"2008-12-08T19:42:21Z","receivedAt":"2008-12-08T19:42:21Z","isPatch":false,"sender":{"key":"davetron5000@gmail.com","avatar":"https://gravatar.com/avatar/9ec09086e36c4e609dfc23a4582d2c7adf7dc2fb1796f74492d52727efa6ba86?d=mp&s=160"},"body":"Thanks for the info :)\n\nThe reason I edited by hand is when I was on trunk (e.g. git checkout\ntrunk), I did a git svn dcommit and it worked, but said \"you aren't on\na branch\", so I was concerned I might be in some weird state (i.e. if\ntrunk isn't a branch, can I make a branch off of it?)\n\nDave\n\nOn Mon, Dec 8, 2008 at 2:35 PM, Peter Harris <git@peter.is-a-geek.org> wrote:\n> On Mon, Dec 8, 2008 at 2:23 PM, davetron5000 wrote:\n>>\n>> So, I overwrote refs/heads/master with the contents of refs/remotes/\n>> trunk (i.e. the SHA-1 of the svn trunk).\n>>\n>> Things seem to be working; git svn dcommit commits to the trunk and\n>> git svn rebase updates from svn's trunk.\n>>\n>> So, I want to make sure that refs/heads/master actuall does, in fact,\n>> point to the head revision of whatever branch is considered \"master\".\n>\n> I do believe so, yes. That, or an entry in packed-refs.\n>\n>> Can someone comfirm this (or provide the actual explanation if I'm\n>> wrong?)\n>\n> Overwriting internal files by hand feels a little too much like work\n> for my taste. I would have done something more like \"git reset --hard\n> trunk\" (or, if not on master, \"git branch -D master; git branch master\n> trunk\" ), but of course you can feel free to do things the hard way if\n> you prefer. :-)\n>\n> Peter Harris\n>\n"},{"id":"97381","messageId":"eaa105840812081155j1e402226i896a7ad3061966e1@mail.gmail.com","threadId":"16638","inReplyTo":"f95d47890812081142k575264fctd77254ed3386a069@mail.gmail.com","subject":"Re: Can someone confirm what the contents of refs/heads/master means?","fromName":"Peter Harris","fromEmail":"git@peter.is-a-geek.org","sentAt":"2008-12-08T19:55:27Z","receivedAt":"2008-12-08T19:55:27Z","isPatch":false,"sender":{"key":"git@peter.is-a-geek.org","avatar":null},"body":"On Mon, Dec 8, 2008 at 2:42 PM, David Copeland wrote:\n> Thanks for the info :)\n>\n> The reason I edited by hand is when I was on trunk (e.g. git checkout\n> trunk), I did a git svn dcommit and it worked, but said \"you aren't on\n> a branch\", so I was concerned I might be in some weird state (i.e. if\n> trunk isn't a branch, can I make a branch off of it?)\n\nTrunk is a \"remote branch\", so you can't check it out. If you try, you\nget what is called a \"detached HEAD\".\n\nhttp://www.kernel.org/pub/software/scm/git/docs/user-manual.html#detached-head\n\nAnd, yes, you can make a local branch off of a remote branch.\n\nPeter Harris\n"},{"id":"97385","messageId":"20081208212636.GA6061@atjola.homenet","threadId":"16638","inReplyTo":"f78b0fcc-6165-440a-b76b-b1b0a281b15c@k8g2000yqn.googlegroups.com","subject":"Re: Can someone confirm what the contents of refs/heads/master means?","fromName":"Björn Steinbrink","fromEmail":"b.steinbrink@gmx.de","sentAt":"2008-12-08T21:26:36Z","receivedAt":"2008-12-08T21:26:36Z","isPatch":false,"sender":{"key":"b.steinbrink@gmx.de","avatar":"https://avatars.githubusercontent.com/u/230962?v=4"},"body":"On 2008.12.08 11:23:46 -0800, davetron5000 wrote:\n> I'm using git-svn to interact with an SVN repo that has branches.\n> \n> After my clone via:\n> \n> git svn clone $REPO/main -T trunk -b branches -t tags\n> \n> my 'master' branch pointed to one of the branches in svn and not to\n> the main trunk. (my .git/config looked correct for svn interaction,\n> i.e. trunk pointed to the right place).\n\nJust to clear up that bit as well. when the \"fetch\" finishes (which is\npart of the clone process), git-svn checks if there is a master branch,\nand if not, it creates one from the last commit it created. So if your\nlast svn commit was to branch XYZ and not to trunk, master will\nreference that commit on branch XYZ.\n\nBjörn\n"},{"id":"97390","messageId":"f95d47890812081421x180ba049p6275cc7bc19eb2c@mail.gmail.com","threadId":"16638","inReplyTo":"20081208212636.GA6061@atjola.homenet","subject":"Re: Can someone confirm what the contents of refs/heads/master means?","fromName":"David Copeland","fromEmail":"davetron5000@gmail.com","sentAt":"2008-12-08T22:21:26Z","receivedAt":"2008-12-08T22:21:26Z","isPatch":false,"sender":{"key":"davetron5000@gmail.com","avatar":"https://gravatar.com/avatar/9ec09086e36c4e609dfc23a4582d2c7adf7dc2fb1796f74492d52727efa6ba86?d=mp&s=160"},"body":"Ah, that makes sense (I did another clone of another repo and did not\nexperience this behavior, so now that all makes sense).\n\nThanks!\n\nDave\n\nOn Mon, Dec 8, 2008 at 4:26 PM, Björn Steinbrink <B.Steinbrink@gmx.de> wrote:\n> On 2008.12.08 11:23:46 -0800, davetron5000 wrote:\n>> I'm using git-svn to interact with an SVN repo that has branches.\n>>\n>> After my clone via:\n>>\n>> git svn clone $REPO/main -T trunk -b branches -t tags\n>>\n>> my 'master' branch pointed to one of the branches in svn and not to\n>> the main trunk. (my .git/config looked correct for svn interaction,\n>> i.e. trunk pointed to the right place).\n>\n> Just to clear up that bit as well. when the \"fetch\" finishes (which is\n> part of the clone process), git-svn checks if there is a master branch,\n> and if not, it creates one from the last commit it created. So if your\n> last svn commit was to branch XYZ and not to trunk, master will\n> reference that commit on branch XYZ.\n>\n> Björn\n>\n"}]}