* Checking out a branch in another directory
@ 2010-09-03 22:10 Luben Tuikov
2010-09-03 22:23 ` Jonathan Nieder
0 siblings, 1 reply; 2+ messages in thread
From: Luben Tuikov @ 2010-09-03 22:10 UTC (permalink / raw)
To: git
I'd like to checkout a branch and work on it and so on, but *in another directory*. I wasn't able to accomplish this with git clone, as I can see that refs/heads were NOT shared as also indicated by .git/config, local and/or shared.
Is there official tools to do this in master?
I basically want to eliminate having to do git-checkout <branch> and instead simply do a cd ../<branch>, but really have just a single history.
For the last 4 years, I've been using a home-brewed git-mkdir-of-branch.sh from a local branch, which basically creates a bunch of symlinks and then runs git-read-tree HEAD; git-checkout-index -u -q -f -a.
Luben
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Checking out a branch in another directory
2010-09-03 22:10 Checking out a branch in another directory Luben Tuikov
@ 2010-09-03 22:23 ` Jonathan Nieder
0 siblings, 0 replies; 2+ messages in thread
From: Jonathan Nieder @ 2010-09-03 22:23 UTC (permalink / raw)
To: Luben Tuikov; +Cc: git
Hi Luben,
Luben Tuikov wrote:
> For the last 4 years, I've been using a home-brewed
> git-mkdir-of-branch.sh from a local branch, which basically creates
> a bunch of symlinks and then runs git-read-tree HEAD;
> git-checkout-index -u -q -f -a.
You might like contrib/workdir/git-new-workdir (shipped in
/usr/share/doc/git by most distros).
An occasional topic has been how to integrate this functionality
into "git clone". See [1], for example.
Good luck,
Jonathan
[1] http://thread.gmane.org/gmane.comp.version-control.git/150559/focus=151247
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-09-03 22:25 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-09-03 22:10 Checking out a branch in another directory Luben Tuikov
2010-09-03 22:23 ` Jonathan Nieder
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 NNTP newsgroup(s).