Sometimes when I'm pair programming (or if someone's been just super helpful to me), I want to be able to give another developer credit in a commit...
For further actions, you may consider blocking this person and/or reporting abuse
This is neat! I am myself using the fancy
--trailer
flag thatgit commit
also provides to do the same:I have even saved this to a git alias when I'm pair-programming more often so that I get the trailer appended automatically. For example:
Now
git commit-jane
allows me to commit with Jane in Co-authored-by :)Ah this is so cool! I'm totally saving this in my gist files. thanks for sharing this!
nice. Appreicating is fulfilling
Woa! This would be a great way of showing them that their time and effort is valued.
Thanks for sharing Cassidy!
Github did this automatically when you commit a suggestion directly. Never know how to do this in command line. Really informative post ⭐️
Nice! 👏
I wrote a similar one some time ago, but to use it alongside
git mob
, which is a cool tool for pairing!dev.to/albarin/how-to-easily-add-c...
ah I feel so bad that I didn't know about this until now and so happy that now I know this. Thanks for sharing this Cassidy! <3
This is really great, thanks for sharing how to do this! That Grady guy also seems really cool.
And sooooo smart
There is also more commit msg keywords convention.. for example :
Cf. Src old wiki, and git trailer SO post
Can you do this trailer action on an amend? Is it just containing that other email in the required format within the commit body message that does this or is it some kind of annotation?
Yeah I think you can do a
to get what you want.
And couple that with
--reuse-message=HEAD
to only add the trailer to the most recent commit and not even trigger an editor to open up: