I'm looking for a command to find all commits which fix my commits

113 views Asked by At

I'm working on a project with the following git naming convention :

  • For a feature, we name our commit by starting with feat like that : feat(myFeature): my feature description

  • For a fix, its the same but we use the keyword fix like this: fix(myFix): my fix description

To improve myself, i want to know when my commit are fixed. I'm not a git guru, i know there are possibilities with git command with grep and blame but i don't know how to mix them.

I'm looking for a git shell command with my name in input which gives me on output all fix commit on my commits.

1

There are 1 answers

2
Romain Valeri On

Set your alias with

git config --global alias.myfixes 'git log --oneline --grep=fix --author=<yourName>'

then to use it, just do

git myfixes

Optionally, you could add the --all flag to the log command in the alias, if you want the search to occur on all branches, not only the current one.

Also, I opted here for a standard --oneline, but of course you might want to replace it with something closer to your specific needs.


As suggested by Ry in comments, depending on your role in the workflow, choose between --author=<yourName> and --committer=<yourName> accordingly.