Find who added a file to git repo

To find which user and when a file gets committed to a git repository, you can use the command

git log --diff-filter=A -- FILE_NAME_HERE

For example

boby@sok-01:~$ git log --diff-filter=A -- global_evildoer.php
commit 263f547cecba129b14faeb412b33ef43c678cced
Author: php user 
Date:   Fri Nov 18 23:27:01 2022 -0800

    brunch changes
boby@sok-01:~$

Back to git

Need help with Linux Server or WordPress? We can help!

Leave a Reply

Your email address will not be published. Required fields are marked *