git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* How do I see all of my changes on a branch?
@ 2009-10-13 19:40 jonhud
  2009-10-13 20:23 ` Shawn O. Pearce
  2009-10-28 12:08 ` Tim Mazid
  0 siblings, 2 replies; 3+ messages in thread
From: jonhud @ 2009-10-13 19:40 UTC (permalink / raw)
  To: git


Hi,

We are using github (but that's more or less irrelevant, since I'm just
running git 1.6 locally on Ubuntu). Some time ago, I created a new branch
(release.2.2) and pushed it out to the remote repository. All the digging
through log, gitk, etc. has not made it possible for me to figure out the
commit (or point in time) at which I cut the branch. 

What I want to do is to get a list of files (and/or diffs for those files)
from that point in time to HEAD on the branch. I understand that git-diff
--name-only is part of the solution. What I can't figure out is how to
pinpoint the first commit. So that's my first question... how do I do that?

To complicate things, I was also working on a side branch which I merged to
master before cutting the release.2.2 branch. In the best of all worlds, I
would trace my changes back to the point at which I cut *that* branch and
follow through the HEAD of release.2.2. How do I do that? I know I might
have to take 2 passes, one for release 2.2 and one for the side branch and
that's OK.

Thanks!

Jon
-- 
View this message in context: http://www.nabble.com/How-do-I-see-all-of-my-changes-on-a-branch--tp25879435p25879435.html
Sent from the git mailing list archive at Nabble.com.

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

* Re: How do I see all of my changes on a branch?
  2009-10-13 19:40 How do I see all of my changes on a branch? jonhud
@ 2009-10-13 20:23 ` Shawn O. Pearce
  2009-10-28 12:08 ` Tim Mazid
  1 sibling, 0 replies; 3+ messages in thread
From: Shawn O. Pearce @ 2009-10-13 20:23 UTC (permalink / raw)
  To: jonhud; +Cc: git

jonhud <jon@huddler-inc.com> wrote:
> We are using github (but that's more or less irrelevant, since I'm just
> running git 1.6 locally on Ubuntu). Some time ago, I created a new branch
> (release.2.2) and pushed it out to the remote repository. All the digging
> through log, gitk, etc. has not made it possible for me to figure out the
> commit (or point in time) at which I cut the branch. 

git merge-base release2.2 HEAD

Which really lets you do:

  git diff $(git merge-base release.2.2 HEAD) HEAD

Which is the long form of:

  git diff release-2.2...HEAD

(diff triple dot operator does the merge base computation for you).
 
-- 
Shawn.

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

* Re: How do I see all of my changes on a branch?
  2009-10-13 19:40 How do I see all of my changes on a branch? jonhud
  2009-10-13 20:23 ` Shawn O. Pearce
@ 2009-10-28 12:08 ` Tim Mazid
  1 sibling, 0 replies; 3+ messages in thread
From: Tim Mazid @ 2009-10-28 12:08 UTC (permalink / raw)
  To: git



jonhud wrote:
> 
> Hi,
> 
> We are using github (but that's more or less irrelevant, since I'm just
> running git 1.6 locally on Ubuntu). Some time ago, I created a new branch
> (release.2.2) and pushed it out to the remote repository. All the digging
> through log, gitk, etc. has not made it possible for me to figure out the
> commit (or point in time) at which I cut the branch. 
> 

Um, unfortunately, all the commits that are prior to HEAD count as being on
the branch.
Have you tried using 'gitk --all' to look through? You should be able to see
the split point there.


jonhud wrote:
> 
> What I want to do is to get a list of files (and/or diffs for those files)
> from that point in time to HEAD on the branch. I understand that git-diff
> --name-only is part of the solution. What I can't figure out is how to
> pinpoint the first commit. So that's my first question... how do I do
> that?
> 

Once you've found the commit, you can 'git diff COMMIT', or you can even,
straight in gitk, (make sure you have your branch selected), right click on
the commit and select 'diff this->selected'.


jonhud wrote:
> 
> To complicate things, I was also working on a side branch which I merged
> to master before cutting the release.2.2 branch. In the best of all
> worlds, I would trace my changes back to the point at which I cut *that*
> branch and follow through the HEAD of release.2.2. How do I do that? I
> know I might have to take 2 passes, one for release 2.2 and one for the
> side branch and that's OK.
> 
> Thanks!
> 
> Jon
> 

The same method should work for that as well.

Good luck,
Tim.
-- 
View this message in context: http://www.nabble.com/How-do-I-see-all-of-my-changes-on-a-branch--tp25879435p26093515.html
Sent from the git mailing list archive at Nabble.com.

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

end of thread, other threads:[~2009-10-28 12:08 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-10-13 19:40 How do I see all of my changes on a branch? jonhud
2009-10-13 20:23 ` Shawn O. Pearce
2009-10-28 12:08 ` Tim Mazid

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