How can you identify who changed the specific file under version control and what were the changes?

Experience Level: Junior
Tags: Git Source control


You can use two different git commands.

  • git blame file.txt - this command will show you the content of the file together with commints and their authors, so you can see who created/changed which line and when
  • git log file.txt - this command will show you the list of all commits that contain any change done to the file
Related Git job interview questions
Git for beginners
Git for beginners

Are you learning Git? Try our test we designed to help you progress faster.

Test yourself