git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* Question about bare repositories
@ 2007-03-16  9:47 Andy Parkins
  2007-03-16 10:05 ` Junio C Hamano
  0 siblings, 1 reply; 4+ messages in thread
From: Andy Parkins @ 2007-03-16  9:47 UTC (permalink / raw
  To: git

Hello,

I'm having an understanding problem, rather than a git problem.  It came about 
because I was looking at a repository using gitweb.  The repository was bare, 
and happened to have HEAD pointing at an old branch that hadn't been updated 
for a long time.  I was confused because I wasn't seeing new commits.  Once I 
set HEAD to master in the bare repository, gitweb showed the new commits.

All that led me to this question, which isn't a criticism, but has exposed a 
hole in my understanding of git.

Why does a bare repository have/need a HEAD?



Andy
-- 
Dr Andy Parkins, M Eng (hons), MIET
andyparkins@gmail.com

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Question about bare repositories
  2007-03-16  9:47 Question about bare repositories Andy Parkins
@ 2007-03-16 10:05 ` Junio C Hamano
  2007-03-16 11:52   ` Andy Parkins
  0 siblings, 1 reply; 4+ messages in thread
From: Junio C Hamano @ 2007-03-16 10:05 UTC (permalink / raw
  To: Andy Parkins; +Cc: git

Andy Parkins <andyparkins@gmail.com> writes:

> Why does a bare repository have/need a HEAD?

To mark which branch the repository owner considers the primary
branch of the repository.  I think "git pull $URL" (i.e. without
using shorthand arranged in the config nor $GIT_DIR/remotes/)
defaults to fetching and merging HEAD from there, for example (I
say "I think" because it's been a while I did so myself, and we
might have broken it during the 1.5.0 process, which had a lot
of work in that area).

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Question about bare repositories
  2007-03-16 10:05 ` Junio C Hamano
@ 2007-03-16 11:52   ` Andy Parkins
  2007-03-16 12:24     ` Johannes Schindelin
  0 siblings, 1 reply; 4+ messages in thread
From: Andy Parkins @ 2007-03-16 11:52 UTC (permalink / raw
  To: git; +Cc: Junio C Hamano

On Friday 2007 March 16 10:05, Junio C Hamano wrote:
> Andy Parkins <andyparkins@gmail.com> writes:
> > Why does a bare repository have/need a HEAD?
>
> To mark which branch the repository owner considers the primary
> branch of the repository.  I think "git pull $URL" (i.e. without

Interesting.   So it's got a much reduced importance and sounds like it is 
mainly as guidance for cloners, etc.

> using shorthand arranged in the config nor $GIT_DIR/remotes/)
> defaults to fetching and merging HEAD from there, for example (I
> say "I think" because it's been a while I did so myself, and we
> might have broken it during the 1.5.0 process, which had a lot
> of work in that area).

Me too; I don't think I've ever used it, which is where my confusion came 
from.

Thanks for the help.


Andy
-- 
Dr Andy Parkins, M Eng (hons), MIET
andyparkins@gmail.com

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Question about bare repositories
  2007-03-16 11:52   ` Andy Parkins
@ 2007-03-16 12:24     ` Johannes Schindelin
  0 siblings, 0 replies; 4+ messages in thread
From: Johannes Schindelin @ 2007-03-16 12:24 UTC (permalink / raw
  To: Andy Parkins; +Cc: git, Junio C Hamano

Hi,

On Fri, 16 Mar 2007, Andy Parkins wrote:

> On Friday 2007 March 16 10:05, Junio C Hamano wrote:
> > Andy Parkins <andyparkins@gmail.com> writes:
> > > Why does a bare repository have/need a HEAD?
> >
> > To mark which branch the repository owner considers the primary
> > branch of the repository.  I think "git pull $URL" (i.e. without
> 
> Interesting.  So it's got a much reduced importance and sounds like it 
> is mainly as guidance for cloners, etc.

It's as much a guidance for cloners, as it is for Git in non-bare repos to 
know which branch gets updated upon commit.

HEAD was never more than a pointer to one (the "current") branch.

Ciao,
Dscho

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2007-03-16 12:24 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-03-16  9:47 Question about bare repositories Andy Parkins
2007-03-16 10:05 ` Junio C Hamano
2007-03-16 11:52   ` Andy Parkins
2007-03-16 12:24     ` Johannes Schindelin

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).