git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Find out on which branch a commit was originally made
@ 2010-09-18  9:19 Stefan Haller
  2010-09-18  9:58 ` Ævar Arnfjörð Bjarmason
  2010-09-24 18:26 ` Bryan Drewery
  0 siblings, 2 replies; 33+ messages in thread
From: Stefan Haller @ 2010-09-18  9:19 UTC (permalink / raw)
  To: git

I'm trying to pursuade my co-workers to switch from Subversion to Git;
some of them prefer Mercurial.

One concern that they are raising is that in Git there doesn't seem to
be an easy way to find out on which branch a given commit was originally
made, after the branch is merged back and deleted. They consider this a
show-stopper.  In Mercurial, branch information is meta data attached to
each commit, so you can easily get this information even after a branch
is closed.

Three questions:

1) Is this not something that Git users miss sometimes?  Why not?

2) Is there an easy way to get this information that I might have
missed?  (Typical use-case: you blame a line of code with git gui blame,
choose "Show history context" to show the changeset in gitk, and from
there you want to go up to the next merge commit to see if the merge
commit message mentions the name of the branch. I can't seem to figure
out how to find this merge commit in gitk, and besides, "Show history
context" shows me only 7 days of context by default, so the merge commit
is likely not to be in my current list anyway.)

3) As a possible work-around, they suggest to require encoding the
branch information in some format in the commit messages, maybe
automatically with a commit-msg hook.  Does this sound like a feasible
idea?  One drawback would be that it becomes awkward when you
accidentally make a commit on the wrong branch, and want to rebase it
onto the correct one.

Any insights and thoughts about this are much appreciated.

Thanks,
   Stefan


-- 
Stefan Haller
Berlin, Germany
http://www.haller-berlin.de/

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

end of thread, other threads:[~2010-09-24 20:57 UTC | newest]

Thread overview: 33+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-09-18  9:19 Find out on which branch a commit was originally made Stefan Haller
2010-09-18  9:58 ` Ævar Arnfjörð Bjarmason
2010-09-18 10:02   ` Ævar Arnfjörð Bjarmason
2010-09-18 11:28   ` Tor Arntsen
2010-09-18 15:26   ` Stefan Haller
2010-09-18 16:41     ` Artur Skawina
2010-09-19  9:45       ` Stefan Haller
2010-09-19 12:54         ` Clemens Buchacher
2010-09-19 14:03         ` Artur Skawina
2010-09-19 14:08         ` Stefan Haller
2010-09-19 16:38           ` Artur Skawina
2010-09-19 18:30     ` Robin Rosenberg
2010-09-19 22:03       ` Seth Robertson
2010-09-19 23:12         ` Artur Skawina
2010-09-19 23:54           ` Seth Robertson
2010-09-20  1:31             ` Artur Skawina
2010-09-20  5:47               ` Seth Robertson
2010-09-20  8:12                 ` Stefan Haller
2010-09-20 10:58                   ` Artur Skawina
2010-09-20 15:49                     ` Artur Skawina
2010-09-21  0:15                       ` Seth Robertson
2010-09-21  2:12                         ` Artur Skawina
2010-09-22 16:35                           ` ANNOUNCE git-what-branch (was Re: Find out on which branch a commit was originally made) Seth Robertson
2010-09-22 20:27                             ` Artur Skawina
2010-09-22 23:26                               ` Find out on which branch a commit was originally made) (was ANNOUNCE git-what-branch) Seth Robertson
2010-09-23 13:14                                 ` Stephen Bash
2010-09-23 13:26                                   ` Ævar Arnfjörð Bjarmason
2010-09-23 21:32                                     ` Artur Skawina
2010-09-24  1:33                                       ` Artur Skawina
2010-09-24 20:57                                       ` Seth Robertson
2010-09-23 14:27                                   ` Seth Robertson
2010-09-20 18:20                     ` Find out on which branch a commit was originally made Stefan Haller
2010-09-24 18:26 ` Bryan Drewery

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