{"thread":{"id":"7269","subject":"Question about bare repositories","startedAt":"2007-03-16T09:47:02Z","lastAt":"2007-03-16T12:24:50Z","messageCount":4,"participants":["Andy Parkins","Junio C Hamano","Johannes Schindelin"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"37221","messageId":"200703160947.03833.andyparkins@gmail.com","threadId":"7269","inReplyTo":null,"subject":"Question about bare repositories","fromName":"Andy Parkins","fromEmail":"andyparkins@gmail.com","sentAt":"2007-03-16T09:47:02Z","receivedAt":"2007-03-16T09:47:02Z","isPatch":false,"sender":{"key":"andyparkins@gmail.com","avatar":null},"body":"Hello,\n\nI'm having an understanding problem, rather than a git problem.  It came about \nbecause I was looking at a repository using gitweb.  The repository was bare, \nand happened to have HEAD pointing at an old branch that hadn't been updated \nfor a long time.  I was confused because I wasn't seeing new commits.  Once I \nset HEAD to master in the bare repository, gitweb showed the new commits.\n\nAll that led me to this question, which isn't a criticism, but has exposed a \nhole in my understanding of git.\n\nWhy does a bare repository have/need a HEAD?\n\n\n\nAndy\n-- \nDr Andy Parkins, M Eng (hons), MIET\nandyparkins@gmail.com\n"},{"id":"37223","messageId":"7vhcslv701.fsf@assigned-by-dhcp.cox.net","threadId":"7269","inReplyTo":"200703160947.03833.andyparkins@gmail.com","subject":"Re: Question about bare repositories","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2007-03-16T10:05:02Z","receivedAt":"2007-03-16T10:05:02Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Andy Parkins <andyparkins@gmail.com> writes:\n\n> Why does a bare repository have/need a HEAD?\n\nTo mark which branch the repository owner considers the primary\nbranch of the repository.  I think \"git pull $URL\" (i.e. without\nusing shorthand arranged in the config nor $GIT_DIR/remotes/)\ndefaults to fetching and merging HEAD from there, for example (I\nsay \"I think\" because it's been a while I did so myself, and we\nmight have broken it during the 1.5.0 process, which had a lot\nof work in that area).\n"},{"id":"37231","messageId":"200703161152.37485.andyparkins@gmail.com","threadId":"7269","inReplyTo":"7vhcslv701.fsf@assigned-by-dhcp.cox.net","subject":"Re: Question about bare repositories","fromName":"Andy Parkins","fromEmail":"andyparkins@gmail.com","sentAt":"2007-03-16T11:52:35Z","receivedAt":"2007-03-16T11:52:35Z","isPatch":false,"sender":{"key":"andyparkins@gmail.com","avatar":null},"body":"On Friday 2007 March 16 10:05, Junio C Hamano wrote:\n> Andy Parkins <andyparkins@gmail.com> writes:\n> > Why does a bare repository have/need a HEAD?\n>\n> To mark which branch the repository owner considers the primary\n> branch of the repository.  I think \"git pull $URL\" (i.e. without\n\nInteresting.   So it's got a much reduced importance and sounds like it is \nmainly as guidance for cloners, etc.\n\n> using shorthand arranged in the config nor $GIT_DIR/remotes/)\n> defaults to fetching and merging HEAD from there, for example (I\n> say \"I think\" because it's been a while I did so myself, and we\n> might have broken it during the 1.5.0 process, which had a lot\n> of work in that area).\n\nMe too; I don't think I've ever used it, which is where my confusion came \nfrom.\n\nThanks for the help.\n\n\nAndy\n-- \nDr Andy Parkins, M Eng (hons), MIET\nandyparkins@gmail.com\n"},{"id":"37234","messageId":"Pine.LNX.4.63.0703161323530.22628@wbgn013.biozentrum.uni-wuerzburg.de","threadId":"7269","inReplyTo":"200703161152.37485.andyparkins@gmail.com","subject":"Re: Question about bare repositories","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2007-03-16T12:24:50Z","receivedAt":"2007-03-16T12:24:50Z","isPatch":false,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Fri, 16 Mar 2007, Andy Parkins wrote:\n\n> On Friday 2007 March 16 10:05, Junio C Hamano wrote:\n> > Andy Parkins <andyparkins@gmail.com> writes:\n> > > Why does a bare repository have/need a HEAD?\n> >\n> > To mark which branch the repository owner considers the primary\n> > branch of the repository.  I think \"git pull $URL\" (i.e. without\n> \n> Interesting.  So it's got a much reduced importance and sounds like it \n> is mainly as guidance for cloners, etc.\n\nIt's as much a guidance for cloners, as it is for Git in non-bare repos to \nknow which branch gets updated upon commit.\n\nHEAD was never more than a pointer to one (the \"current\") branch.\n\nCiao,\nDscho\n"}]}