git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* ephemeral-branches instead of detached-head?
@ 2013-08-12  7:25 David Jeske
  2013-08-12  7:39 ` Jonathan Nieder
  2013-08-12  7:55 ` Junio C Hamano
  0 siblings, 2 replies; 24+ messages in thread
From: David Jeske @ 2013-08-12  7:25 UTC (permalink / raw)
  To: git

Has there ever been any any discussion of creating an ephemeral-branch
name mechanism, instead of using detached HEADs?

By ephemeral, I mean that a branch-name could be created which would
live only so long as it is the only named way to reach a ref or the
ref is in the working directory. Ephemeral branch names would be
local-only and would never be pushed.

For example, if one performed "git checkout 2c29d...", one would not
get a detached head-state, but instead would get an ephemeral branch
name similar to "etmp/2c29d...". If no changes were checked into this
ephemeral branch, it would disappear as soon as it was no longer in
the working directory. If any changes were checked in on this branch,
it would survive until (a) the ref is given a non-ephemeral branch
name, (b) the changes are merged, (c) the ephemeral branch is
deleted/discarded.

I'm asking about (and proposing) this mechanism, because it would
prevent refs from ever being "accidentally lost", such as occurs in
the following scenerios..

1) forgetting to branch a detached head before checkin
2) forgetting a head is detached before moving away from it
3) forgetting about checkins before a submodule update

Also, these "etmp/####" branches would serve as an obvious visible
reminder in the branch list that a change was checked in that should
either be merged, named, or discarded.

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

end of thread, other threads:[~2013-08-14 16:40 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-12  7:25 ephemeral-branches instead of detached-head? David Jeske
2013-08-12  7:39 ` Jonathan Nieder
2013-08-12  7:55 ` Junio C Hamano
2013-08-12  8:37   ` David Jeske
2013-08-12 12:14     ` David Jeske
2013-08-12 13:23       ` Duy Nguyen
2013-08-12 17:04         ` Andreas Schwab
2013-08-12 17:24         ` Junio C Hamano
2013-08-12 19:40           ` David Jeske
2013-08-12 19:05         ` David Jeske
2013-08-12 17:22       ` Junio C Hamano
2013-08-13  6:05     ` Duy Nguyen
     [not found]       ` <CA+CP9O5Ak3YD60--Mj+eLv3qzbZuuwTN-AxY3xb=SciKD=uZoQ@mail.gmail.com>
2013-08-13 15:13         ` Duy Nguyen
2013-08-13 15:36         ` Fwd: " David Jeske
2013-08-13 16:58           ` Junio C Hamano
2013-08-13 17:13             ` Junio C Hamano
2013-08-13 16:49       ` Junio C Hamano
2013-08-14  0:04         ` Sitaram Chamarty
2013-08-14  1:44           ` Junio C Hamano
2013-08-14  6:32             ` Sitaram Chamarty
2013-08-14  6:59               ` Jeff King
2013-08-14  7:10               ` Andres Perera
2013-08-14  9:05                 ` Sitaram Chamarty
2013-08-14 16:40                   ` Andres Perera

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).