How can you identify who changed the specific file under version control and what were the changes?
Experience Level:
Junior
Tags:
Git
Source 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 whengit 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
-
How do you add a new file to the Git remote repository?
Git Junior -
What is a git commit command?
Git Source control Junior -
How can you find out what were the most recent changes in Git repository and who made them?
Git Source control Junior -
How do you get changes from the remote repository to your computer?
Git Source control Junior -
What is a difference between local and remote repository?
Git Source control Junior