Thread (2 messages) flat view 2 messages, 2 authors, 2016-06-15

Re: master^ is not a local branch -- huh?!?

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:48:08

Ron Garret [off-list ref] writes:
My actual use case is very complicated, but here's a simplified version:

Suppose I'm using git as a back-end for a wiki.  I want to look at the 
state of the entire wiki as it was in some point in the past, and I also 
want to be able to look at the diffs between individual pages as they 
were then and as they are now.
Don't think you are so special ;-) "git checkout $that_old_commit" was
invented _exactly_ for that use case.  You can look around from that
state, and when you are done sightseeing, you can come back by doing a
"git checkout master" (or whichever branch you want to be on).

You don't necessarily have to check out an old state if the only thing
you are interested in is to review how the contents changed over time.
Use "git log -p" (from the current tip) for that.

If you chose to have an old checkout and then traverse the changes over
time leading to the current tip, you would say "git log -p ..master"
instead.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help