git log command for all commits of a specific file

3

You can check the git log for all commits of a specific file.

I made a commit to a foo.txt file and now it no longer shows in the git history.

My command:

git log foo.txt

I want to search all commits records for this file, and then find my "lost" commit.

    
asked by anonymous 10.01.2018 / 15:07

2 answers

2
git log --follow arquivo

On all branches

git log --follow --all arquivo
    
10.01.2018 / 16:28
1

Try using the following command

git log -p myFile
    
10.01.2018 / 16:22