From: "Julián Landerreche" <maniqui@gmail.com>
To: git@vger.kernel.org
Subject: Re: [RFC/PATCH] Add multiple workdir support to branch/checkout
Date: Sat, 8 Oct 2011 22:55:22 +0000 (UTC) [thread overview]
Message-ID: <loom.20111009T000812-294@post.gmane.org> (raw)
In-Reply-To: 1317786204-57335-1-git-send-email-jaysoffian@gmail.com
Jay wrote:
> I guess it depends what you mostly use your workdirs for. For me, it's
> to have different branches checked out, not to have the same branch
> checked out in multiple locations.
I find those both use cases for workdirs to fit perfectly in my usual workflow
(web development).
- Different branches checked out
I've a cloned repo of a CMS and I use git-new-workdir to checkout different
branches and tags, so to have available a few workdirs of recent versions, which
I "attach" by symlinks to my web development projects.
- Same branch checked out in multiple locations
This use case just came up recently, when I find out that I prefer to have two
websites "attached" (via symlink) to two different workdirs of the same branch.
I could have "attached" both websites to the same workdir, but my idea of having
the websites "attached" to different workdirs was to be able to do some
development (i.e: to commit stuff) on one workdir, while keeping the other one
"fixed" at some particular commit.
Juno wrote:
> Careful. Git has survived without your patch series till now, as people
> learned to be careful when they use separate workdirs and avoid certain
> things, to the point that they are not necessarily aware that they are
> avoiding them (one good practice is to keep the HEADs of non-primary
> workdirs detached).
Jay wrote:
> Also, while I might recommend new-workdir to my coworkers with the
> advice "don't checkout the same branch in multiple workdirs", never in
> a million years would I say "use new-workdir, but make sure to only
> use a detached HEAD in the workdirs." The latter would make their
> actual HEADs explode.
After reading this, I noticed that using git-new-workdir with detached HEAD in
each workdir could fit my workflow very well. In some cases (the ones mentioned
above), I find that I may not need to have a workdir for a branch (where I won't
do work, so won't be committing there), but rather to have that workdir "fixed"
at a particular commit.
That being said, I also see that I would find useful to be able to
update/advance this workdir (in a detached HEAD state, that is, "fixed" at an
specific commit) to a newer commit or to a particular branch.
Bottom line: making git-new-workdir a more reliable & friendly tool that could
fit in the workflows of both advanced and non-advanced users.
-----
Quick note about me: I am an "advanced n00b" on git usage (using it since one
year ago), and a general non-advanced user (of git and git-new-workdir). In
other words, a git user that could easily shoot itself in the foot.
Arrived here while looking for some info about git-new-workdir, and if it was a
Bad Idea to have different workdirs of the same branch (ie. checkout the same
branch on different folders), as the idea of recklessly committing on different
workdirs for the same branch sounded like a recipe for disasters to me.
I find it git-new-workdir a really useful tool in my workflow, and prefer it
over having many clones of the same repo, which will imply having to do
configuration for remotes and push/pull operations, which are also mind-boggling
tasks for non-advanced users.
-----
Thanks for reading.
prev parent reply other threads:[~2011-10-08 23:00 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-05 3:43 [RFC/PATCH] Add multiple workdir support to branch/checkout Jay Soffian
2011-10-05 3:48 ` Jay Soffian
2011-10-05 4:02 ` Nguyen Thai Ngoc Duy
2011-10-05 13:11 ` Jay Soffian
2011-10-05 16:46 ` Junio C Hamano
2011-10-05 17:17 ` Jay Soffian
2011-10-05 18:19 ` Junio C Hamano
2011-10-05 19:11 ` Jay Soffian
2011-10-05 20:00 ` Andreas Krey
2011-10-05 20:50 ` Jay Soffian
2011-10-05 21:30 ` Jonathan Nieder
2011-10-05 21:52 ` Jay Soffian
2011-10-05 21:57 ` Jonathan Nieder
2011-10-05 21:29 ` Junio C Hamano
2011-10-05 21:49 ` Jay Soffian
2011-10-05 19:14 ` Jay Soffian
2011-10-05 22:47 ` Nguyen Thai Ngoc Duy
2011-10-05 22:56 ` Junio C Hamano
2011-10-05 23:11 ` Nguyen Thai Ngoc Duy
2011-10-05 23:49 ` Junio C Hamano
2011-10-06 0:33 ` Jay Soffian
2011-10-06 0:43 ` Junio C Hamano
2011-10-06 0:57 ` Jay Soffian
2011-10-06 1:15 ` Junio C Hamano
2011-10-06 1:38 ` Jay Soffian
2011-10-06 1:57 ` Junio C Hamano
2011-10-06 4:02 ` Jay Soffian
2011-10-06 2:06 ` Nguyen Thai Ngoc Duy
2011-10-06 11:25 ` Bernhard R. Link
2011-10-06 14:42 ` Jeff King
2011-10-05 22:38 ` Nguyen Thai Ngoc Duy
2011-10-05 4:07 ` Junio C Hamano
2011-10-05 15:24 ` Jay Soffian
2011-10-05 16:01 ` Jay Soffian
2011-10-08 22:55 ` Julián Landerreche [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=loom.20111009T000812-294@post.gmane.org \
--to=maniqui@gmail.com \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.