Register to Better Coder! It's free.
Enjoy the premium features and succeed at every job interview.

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

Experience Level: Junior
Tags: GitSource control

Answer

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

Comments

No Comments Yet.
Be the first to tell us what you think.
Git for beginners
Git for beginners

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

Test yourself
25 Git questions that will help you to nail your job interview
25 Git questions that will help you to nail your job interview

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

Test yourself