git check when a file was committed code example Example: git file history git log --follow -p -- path-to-file