I'll put my story on how I got here at the end for those looking for an answer quick:
Documentation:
- Multiple paragraphs on "git commit -m" command by Airton
- Creating a commit with multiple authors — Github Docs
- Stack Overflow
What I did:
-
git log
to see what commits needed to be changed -
git rebase -i HEAD~6
— I needed to rebase 6 commits - Thanks to what I learned about rebasing recently I was able to use some vi(m?) tricks like
cw
to delete thepick
quickly and change it to ane
for edit. -
Use
git commit -m --amend "Commit message dquote> dquote> dquote> Co-authored-by: Name <commit-email@email.com> dquote> Co-authored-by: Another Name <another-commit-email@email.com>"
- Pressing enter without the closing quotation will create the
dquote>
this means a new line has been created. (At least that's the case with zsh, idk if this is a standard) - Note the same name and commit-email we noted for setting the GPG key is needed here as well. So you'll want the people you're working with to verify their commit email
- Pressing enter without the closing quotation will create the
-
Once you're happy with the message you can
git rebase --continue
- If you're not happy you can try again with the previous command.
Repeat the previous two steps as needed
Then
git push -force
was how I updated the remote, but it looks likegit push -force-with-lease
is a thing. I can't tell you the difference here so proceed with caution.
And done. I was really confused about the dquote>
thing whenever I saw it previously lol Now I know it's just a new line haha
Inspiration:
So I paired / mobbed programmed with some folks in the Virtual Coffee community. We add an action to my profile and update the CNAME to my custom domain check me out, check me out!
In the moment I was just creating commits and trying to keep up with the flow of the pairing. I learned so much got it all in the README and had a lovely time!
Well I wanted to give some credit to the folks that helped me make this action!
Recently, I had the wonderful experience of pairing and was credited for helping in the creation of tests and debugging process of a project written in Go.
The experience really opened my eyes to the differences in statically typed vs dynamically typed languages and the power of an IDE. Most of what I did was listen and ask some questions, as almost everything went over my head, but it was fun? Kinda like being thrown into a conversation with someone that speaks a different language. Just trying to catch on and then starting to ask basic questions, I live for those interactions.
Anyways, I'm in the front-end so this was much like watching some wizardry happen before my eyes haha But in the end I was asked if I wanted to be co-author! I loved that and wanted to be sure to do the same when this opportunity to mob program came up! And here we are :)
Top comments (0)