This write-up discusses the method of viewing the Git log of just one user’s commits.
How to View a Git Log of Just One User’s Commits?
To view a Git log of a particular user’s commits, try out the below-listed instructions:
- Go to the Git root directory.
- Check the list of all users.
- Run the “$ git log” command along with the “–authors” parameter and its value.
Now, move ahead and partially perform the above-given steps for better understanding.
Step 1: Move to Root Directory
The first and foremost thing is to navigate to the Git root directory by running the provided command:
Step 2: View Users List
Now, execute the “git shortlog” command with the “-nse” option to view author names with commit count:
Step 3: Get Particular User’s Commit Git Log
To get the particular user’s commit Git log, run the “git log” command with the “–author” parameter and its value:
Here, “Maria” is one of our Git usernames:
As you can see, the list of Git logs against this specified user is displayed.
Conclusion
To view a Git log of a particular user’s commits, move to the Git root directory and check the list of users by executing the “$ git shortlog -nse” command. Then, run the “$ git log” command along with the “–authors” parameter and its value. This write-up demonstrated the method of viewing the Git log of just one user’s commits.