1

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.

Leasye
  • 261
  • 1
  • 8
  • 19

1 Answers1

0

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.

Romain Valeri
  • 19,645
  • 3
  • 36
  • 61
  • This looks like a command to find all fixes an author made, not all fixes made to features an author committed. – Ry- May 19 '19 at 03:50
  • @Ry Hmm, you might be right, I had wondered but it's unsure from the way the question is asked. But for completion, yes, I'll edit. – Romain Valeri May 19 '19 at 04:01