{"thread":{"id":"5575","subject":"bare repositories: packing and fetching","startedAt":"2006-09-15T18:04:39Z","lastAt":"2006-09-15T20:44:15Z","messageCount":4,"participants":["Andy Whitcroft","Jakub Narebski","Johannes Schindelin","Junio C Hamano"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"26978","messageId":"450AEB37.3090909@shadowen.org","threadId":"5575","inReplyTo":null,"subject":"bare repositories: packing and fetching","fromName":"Andy Whitcroft","fromEmail":"apw@shadowen.org","sentAt":"2006-09-15T18:04:39Z","receivedAt":"2006-09-15T18:04:39Z","isPatch":false,"sender":{"key":"apw@shadowen.org","avatar":"https://gravatar.com/avatar/d3088262854661a913ef35cc40fedcc270142d4461791142bc1ea0b2a4e2e147?d=mp&s=160"},"body":"I was trying to make a bare repo to stage linus' main tree.  As this was\nonly to be a local tree for others to pull from I thought that I could\nclone his tree 'bare' and then fetch into that on a regular basis.  That\ndoes not appear to be the case?  Both git fetch and git repack say 'not\na git repository .git' and bail.\n\nIs this expected behaviour.  Do I have to have all the checked out files?\n\n-apw\n"},{"id":"26979","messageId":"eeeqbv$8na$1@sea.gmane.org","threadId":"5575","inReplyTo":"450AEB37.3090909@shadowen.org","subject":"Re: bare repositories: packing and fetching","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2006-09-15T18:11:41Z","receivedAt":"2006-09-15T18:11:41Z","isPatch":false,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"Andy Whitcroft wrote:\n\n> I was trying to make a bare repo to stage linus' main tree.  As this was\n> only to be a local tree for others to pull from I thought that I could\n> clone his tree 'bare' and then fetch into that on a regular basis.  That\n> does not appear to be the case?  Both git fetch and git repack say 'not\n> a git repository .git' and bail.\n> \n> Is this expected behaviour.  Do I have to have all the checked out files?\n\nNo, but perhaps git doesn't detect _where_ is a git repository. With full\nrepository git tries to find .git somewhere in the directory, or it's\nparents, if I understand correctly.\n\nIf running git commands from the inside of bare repository doesn't work, try\nsetting enviromental variable GIT_DIR (e.g. GIT_DIR=git.git git fetch\norigin), or with git 1.4.2 or newer with --git-dir option (e.g. git\n--git-dir=git fetch origin).\n-- \nJakub Narebski\nWarsaw, Poland\nShadeHawk on #git\n"},{"id":"26982","messageId":"Pine.LNX.4.63.0609152049310.19042@wbgn013.biozentrum.uni-wuerzburg.de","threadId":"5575","inReplyTo":"eeeqbv$8na$1@sea.gmane.org","subject":"Re: bare repositories: packing and fetching","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2006-09-15T18:50:20Z","receivedAt":"2006-09-15T18:50:20Z","isPatch":false,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Fri, 15 Sep 2006, Jakub Narebski wrote:\n\n> Andy Whitcroft wrote:\n> \n> > I was trying to make a bare repo to stage linus' main tree.  As this was\n> > only to be a local tree for others to pull from I thought that I could\n> > clone his tree 'bare' and then fetch into that on a regular basis.  That\n> > does not appear to be the case?  Both git fetch and git repack say 'not\n> > a git repository .git' and bail.\n> > \n> > Is this expected behaviour.  Do I have to have all the checked out files?\n> \n> No, but perhaps git doesn't detect _where_ is a git repository. With full\n> repository git tries to find .git somewhere in the directory, or it's\n> parents, if I understand correctly.\n\nExactly. Since there is no .git directory, git does not know where it \nshould look for the repository.\n\nTry \"git --bare fetch\".\n\nHth,\nDscho\n"},{"id":"26983","messageId":"7vzmd0g8rk.fsf@assigned-by-dhcp.cox.net","threadId":"5575","inReplyTo":"450AEB37.3090909@shadowen.org","subject":"Re: bare repositories: packing and fetching","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2006-09-15T20:44:15Z","receivedAt":"2006-09-15T20:44:15Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Andy Whitcroft <apw@shadowen.org> writes:\n\n> I was trying to make a bare repo to stage linus' main tree.  As this was\n> only to be a local tree for others to pull from I thought that I could\n> clone his tree 'bare' and then fetch into that on a regular basis.  That\n> does not appear to be the case?  Both git fetch and git repack say 'not\n> a git repository .git' and bail.\n>\n> Is this expected behaviour.  Do I have to have all the checked out files?\n\ncd $that_repository && GIT_DIR=. git fetch\n"}]}