Git log of all (modifying) commands run on a repo?

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

 



Our company recently switched to git.  Our enthusiasm for git outweighs
the problems we have encountered so far, universally those of user
befuddlement, not git problems per se.

I have destroyed several repos by accidentally pulling from or pushing
to the wrong branch, not realizing this until later, and, trying what
I thought the proper way to undo it, failed that miserably.  I have
destroyed a few other repos by pulling from a "polluted" repo of a
co-worker that had mistakenly merged things in, and have had to resort
each time to full-scale reconstructions (again, almost trivially
accomplished thanks to git).  Thankfully, our company repo is so far
pristine, and I have been able to quickly reconstruct things and
continue working.

A co-worker just called to say he apparently had done something
similar, as he tried to pull from our company repo, got a conflict,
and then discovered files and changes to files that should not have
been on the master branch.  These files and changes do not exist in
our company repo, of that we are certain.

I'm not certain how I managed to screw up my repo, and he is equally
unsure of how he managed to screw up his.

I thought that it would be very useful to have a history of git
commands that have been run against a repo, in order to hopefully
debug this sort of thing --- perhaps only those that modify the repo.

I suppose this would need to include information about which branches
were affected as well.

% cat .git/repo.log
[....]
2007-02-07 10:05:44 git pull . .....
** Pull from master branch onto project branch
** Pull from foobar branch onto boobar branch
** ...
2007-02-07 10:05:44 git pull git://source/project master:project
** Your explanation here...

Would this sort of thing be easy to do?  I presume git does not
currently have support for this, but thought I would ask.


Bill
-
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]