Filter git log to show only my changes

GitVersion Control

Git Problem Overview


How can I filter the git log to show only my changes (excluding the changes committed by other developers)?

Git Solutions


Solution 1 - Git

You can filter the log by the author for example, so you can filter by your name :

git log --author="YourName"

or by committer :

 git log --committer="YourName"

Solution 2 - Git

You should use the --author flag to the git-log command.

Like so:

git log --author="You Name"

Part of name is also working:

git log --author=Name

However if you want to use in a generic script like in this tip, you could do it like this:

git log --author="$(git config user.name)"

You could then make an alias:

git config --global alias.mylog '!git log --author="$(git config user.name)"'

You could then just type: git mylog and see your commits only.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionVeeraView Question on Stackoverflow
Solution 1 - GitalerootView Answer on Stackoverflow
Solution 2 - GitHaralan DobrevView Answer on Stackoverflow