git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Identifying user who ran “git reset” command

From
Kevin Daudt <me@ikke.info>
Date
Feb 23, 2015, 16:48 UTC
Message-ID
<20150223164833.GA17528@vps892.directvps.nl>
In-Reply-To
<1424495778228-7625791.post@n2.nabble.com>
On Fri, Feb 20, 2015 at 10:16:18PM -0700, Technext wrote:
Show 7 quoted lines
> Thanks Junio for the prompt reply! :) Yes, that's exactly how i would like
> things to be. I'll definitely try to push this thing and see if this flow
> can be implemented.
> 
> However, can you please guide me whether there's any way i could have
> figured out about the git reset command that the developer executed on his
> local? (my first query)

git reset . is just a local working tree operation, which does not leave something behind, just like when the user would do any other file operations and comitted that. This created a so called evil merge, which are not easy to detect (see [1] for some possible solutions)

> 
> Also, am i right in thinking that a check cannot be implemented using hooks
> or any other similar way? (my second query)

Because an evil merge is hard to detect, it's even harder to do it automated in a script. Human review works much better for this (when merging in the changes from the developer).

[1]: https://stackoverflow.com/a/27744011/20261
Previous: TechnextNext: Randall S. Becker
Message 4 of 5 in “Identifying user who ran “git reset” command”
  1. TechnextFeb 21, 2015
  2. Junio C HamanoFeb 21, 2015
  3. TechnextFeb 21, 2015
  4. Kevin DaudtFeb 23, 2015
  5. Randall S. BeckerFeb 23, 2015

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.