git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* RE: newb: Given a commit id, find which branches have it as an ancestor
@ 2009-03-13 16:20 John Dlugosz
  0 siblings, 0 replies; 8+ messages in thread
From: John Dlugosz @ 2009-03-13 16:20 UTC (permalink / raw)
  To: git

=== Re: ===
What I'm beginning to suspect is that all the commits that should have
gone to master went to some unnamed branch.
Is that reasonable/possible/likely?  This commit has a full ancestry,
but doesn't appear to be on any branch.
=== end===

Both gitk (comes with git) and QGit showthe branches on the GUI when you highlight the commit of interest.

As for recovering lost commits, I've been down that road, and using fsck or worse yet looking at all the files in the objects directory is no fun.  The 'reflog' is your friend!  Use reflog to spot which one is interesting, and then use something like
                git tag here HEAD@{5}
and then bring up gitk with "all branches" and sort it out.

--John
(please excuse the footer; it's not my idea)

TradeStation Group, Inc. is a publicly-traded holding company (NASDAQ GS: TRAD) of three operating subsidiaries, TradeStation Securities, Inc. (Member NYSE, FINRA, SIPC and NFA), TradeStation Technologies, Inc., a trading software and subscription company, and TradeStation Europe Limited, a United Kingdom, FSA-authorized introducing brokerage firm. None of these companies provides trading or investment advice, recommendations or endorsements of any kind. The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from any computer.

^ permalink raw reply	[flat|nested] 8+ messages in thread
* newb: Given a commit id, find which branches have it as an ancestor
@ 2009-03-12 15:21 Kelly F. Hickel
  2009-03-12 15:38 ` Johannes Sixt
  0 siblings, 1 reply; 8+ messages in thread
From: Kelly F. Hickel @ 2009-03-12 15:21 UTC (permalink / raw)
  To: git; +Cc: Kelly F. Hickel

Hi all, I've been working on testing importing our cvs repo via cvs2git,
then using cvsps to pull incremental updates.  Something seems to have
gone awry with one of the commits, and I'm having trouble tracking it
down.

This is a question about how to track something down after the fact, not
a question about what went wrong with the cvsps import....

This is git 1.6.1 running on Centos 5.2 linux.

So, the scenario is that one of the last few commits pulled into my git
repo by cvsps/cvsimport should have landed on origin/master, but when I
look at the file, the change is missing.  I'm trying to figure out
"where it went", since it didn't go where I expected it.

Things I've tried that didn't tell me what I wanted to know:
$ git name-rev 15fa81b
15fa81b undefined


$ git log --children 15fa81b
This shows me a bunch of commits that, going by the commit date, appear
to be ancestors of the commit I'm interested in, not children.

$ git checkout  15fa81b5ae
Note: moving to "15fa81b5ae" which isn't a local branch If you want to
create a new branch from this checkout, you may do so (now or later) by
using -b with the checkout command again. Example:
  git checkout -b <new_branch_name>
HEAD is now at 15fa81b... Changed version to 4.1.0.157 $ gitk (as
expected, shows me that the commit I care about is the latest in the
workspace)

$ git checkout master
Previous HEAD position was 15fa81b... Changed version to 4.1.0.157
Switched to branch "master"
$ gitk
Doesn't list my target commit, in fact, doesn't list any commits after
the cvs2git date, so it appears that none of my cvsps pulled commits
landed on master (ok, so maybe this post is about what went wrong, just
a little ;-} ).

I suspect that I'm missing some factoid in trying to map my workflow to
Git, but this seems like the kind of thing I'd want to know, i.e. given
a commit, what branches have that commit as an ancestor.  It would seem
to be useful in two cases:
1) I've found a commit that introduced a bug and want to know what
releases that bug ended up in.
2) I've identified a fix for a previous bug and want to know what
releases already contain the fix.
(ok, those are pretty much the same workflow, but different reasons).

What am I missing????



--

Kelly F. Hickel
Senior Product Architect
MQSoftware, Inc.
952-345-8677 Office
952-345-8721 Fax
kfh@mqsoftware.com
www.mqsoftware.com
Certified IBM SOA Specialty
Your Full Service Provider for IBM WebSphere
Learn more at www.mqsoftware.com 

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

end of thread, other threads:[~2009-03-13 16:22 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <63BEA5E623E09F4D92233FB12A9F794302E0F9B2@emailmn.mqsoftware.com>
2009-03-12 19:38 ` newb: Given a commit id, find which branches have it as an ancestor Kelly F. Hickel
2009-03-13  7:14   ` Johannes Sixt
2009-03-13  7:37     ` Junio C Hamano
2009-03-13 13:31       ` Kelly F. Hickel
2009-03-13 13:30     ` Kelly F. Hickel
2009-03-13 16:20 John Dlugosz
  -- strict thread matches above, loose matches on Subject: below --
2009-03-12 15:21 Kelly F. Hickel
2009-03-12 15:38 ` Johannes Sixt

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