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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 29 Jan 2010 14:47:49 -0800, Ron Garret <ron1@xxxxxxxxxxx> wrote:

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,

mkdir new_dir; git archive --format=tar tree-ish | tar -C new_dir -x

Of course, this is slower than just checking out the files that differ,
I agree.

and I also
want to be able to look at the diffs between individual pages as they
were then and as they are now.

git diff commit-ish1 commit-ish2 file1 file2 ...

Or you could just clone it and compare whatever you want there and just
erase when done. This would allow you to do "git pull" from the origin.

If I do a git reset --hard then I get the old version, but I lose my
HEAD pointer so that git diff doesn't give me what I want any more.

You could tag the current version before resetting and then issue
git reset --hard the_tag, but I guess you would run into race conditions:
someone updates the wiki while the HEAD is in another commit.

Hope it helps. :-)
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]