简体   繁体   中英

Filter git log to show only my changes

如何过滤git log以仅显示我的更改(不包括其他开发人员提交的更改)?

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"

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM