{"thread":{"id":"23177","subject":"Reuse .git directory.","startedAt":"2010-03-25T17:50:14Z","lastAt":"2010-03-25T19:24:54Z","messageCount":3,"participants":["Mahesh Vaidya","Ramkumar Ramachandra","Junio C Hamano"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"137803","messageId":"10467746.91269539410487.JavaMail.mvaidya@mvaidya-desktop","threadId":"23177","inReplyTo":null,"subject":"Reuse .git directory.","fromName":"Mahesh Vaidya","fromEmail":"forvaidya@gmail.com","sentAt":"2010-03-25T17:50:14Z","receivedAt":"2010-03-25T17:50:14Z","isPatch":false,"sender":{"key":"forvaidya@gmail.com","avatar":null},"body":"Reuse .git directory.\n\nI would like work 4 different branch simultaneously viz.\n\nmaster, feature, bugfix, expt but would like to use same same GIT_DIR. Is this possible ? so that I can save some space ?\n\nI have tried following \n* git clone /path/to/repos\n* export GIT_DIR=/path/to/repos/.git\n* mkdir ~/feature\n* git checkout -b feature master\n\nThis step misses the files. Please advise me if such an approach is correct ?\n\n\nThx\n\nMahesh\n"},{"id":"137805","messageId":"f3271551003251058y45a37ea2n9867fc1abbb50a07@mail.gmail.com","threadId":"23177","inReplyTo":"10467746.91269539410487.JavaMail.mvaidya@mvaidya-desktop","subject":"Re: Reuse .git directory.","fromName":"Ramkumar Ramachandra","fromEmail":"artagnon@gmail.com","sentAt":"2010-03-25T17:58:39Z","receivedAt":"2010-03-25T17:58:39Z","isPatch":false,"sender":{"key":"r@artagnon.com","avatar":"https://avatars.githubusercontent.com/u/37226?v=4"},"body":"Hi,\n\n> I would like work 4 different branch simultaneously viz.\n> master, feature, bugfix, expt but would like to use same same GIT_DIR. Is this possible ? so that I can save some space ?\n\nAll Git branches *are* contained in the same GIT_DIR. I'm not sure\nwhat your question is, but I suspect you don't understand how\nbranching works in Git. Please read up some introductory material on\nthis.\n\n-- Ram\n"},{"id":"137809","messageId":"7vfx3oxkzd.fsf@alter.siamese.dyndns.org","threadId":"23177","inReplyTo":"10467746.91269539410487.JavaMail.mvaidya@mvaidya-desktop","subject":"Re: Reuse .git directory.","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2010-03-25T19:24:54Z","receivedAt":"2010-03-25T19:24:54Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"git-new-worktree, perhaps?\n"}]}