Reputation: 23
As we know, Git has a powerful option "-f" with "git push" command, which could change remote code repository history and committed change.
As a pure Git command line user, is there a way to track who just did that kind of thing to notify him/her not to do it again ? Maybe he/she is using some GUI tool and doesn't know what he/she is really doing.
BTW, commit history is ever the root that we can use to check what happened. but git-force-push just changed it so that (sounds like) all clues are lost.
Upvotes: 2
Views: 47
Reputation: 527073
Git itself does not track that information. If you control the server, you could set up a pre- or post-receive hook to record who pushed what and when.
For past occasions, if you use HTTPS or SSH protocols for pushing code, your web/ssh server logs might be of use in identifying past actors.
Upvotes: 1