Git

How to Git Log from All Branches for the Author at Once

The Git log displays the detailed commit history of the repository including commit hash, commit message, author name, date, and time of all commits. It also shows the branch and tag name associated with each commit. Sometimes, developers may need to view the commit history of all branches for a particular author to understand the changes made to the codebase by that developer. Moreover, it helps users to identify issues and bugs in the code.

This study will explain the method to display the Git log of all branches for the specific author.

How to View the Git Log of All Branches for the Specific Author at Once?

To view the Git log of all branches for the particular author at once, first, specify the author. Then, different options can be used with the “git log” command, such as:

Example 1: View Git Log of All Branches for Particular Author Using “–all” Option

The “git log” command displays/shows the commit history of all the authors of the current branch. Specify the particular author and utilize the “all” option with the same command to view the Git log of all branches for the specified author:

git log --oneline --author="Amna Ali" --all

Here:

  • –oneline” option is used to display output in one line.
  • –author” option is utilized to specify the particular author and display its commits.
  • –all” option will show the commit history of all branches.

In the below output, the commit history of all the available branches made by the author “Amna Ali” can be seen:

Example 2: View Git Log of All Branches for Particular Author Using “–branches” Option

The “branches” option can also be used to display the Git log of all branches for the specific author:

git log --oneline --author="Amna Ali" --branches

The below screenshot displays the Git log of all the branches:

That was all about viewing the Git log of all branches for the specific author.

Conclusion

To display the Git log of all branches for the particular author, use the “git log” command with the “–all” or “–branches” option and specify the author’s name. This study explained the procedure to display the Git log of all branches for the specific author.

About the author

Laiba Younas

I have done bachelors in Computer Science. Being passionate about learning new technologies, I am interested in exploring different programming languages and sharing my experience with the world.