How to check who deleted a specific file if you don't know the commit, data and even branch?

Akarshit Verma September 15, 2021

How to check who deleted a specific file if you don't know the commit, data and even branch?

1 answer

1 vote
Caroline R
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
September 16, 2021

Hi, @Akarshit Verma! Welcome to the community! 

If you have the file name, you can run the following command to see the changes of this file even if the file was deleted:

git log --full-history  -- filename

In case you would like to see just the last commit, which deleted the file, use -1 in the command above:

git log --full-history -1 -- {file name}

This will show you the author and the date of this commit.

I hope this helps, but do let me know if you have any questions. 

Kind regards,
Caroline

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS
AUG Leaders

Atlassian Community Events