paint-brush
Power up your pair programming with co-authored commits on GitHubby@james.kyle.lemon
2,006 reads
2,006 reads

Power up your pair programming with co-authored commits on GitHub

by Kyle LemonApril 13th, 2018
Read on Terminal Reader
Read this story w/o Javascript
tldt arrow

Too Long; Didn't Read

Pair <a href="https://hackernoon.com/tagged/programming" target="_blank">programming</a> is more popular than ever. The benefits are clear: greater knowledge-sharing, less mental fatigue and better code, to name a few. It seems that the trend toward more collaborative coding will only grow in the future. In light of this, <a href="https://hackernoon.com/tagged/github" target="_blank">GitHub</a> announced in late January 2018 that it now supports co-authored commits.
featured image - Power up your pair programming with co-authored commits on GitHub
Kyle Lemon HackerNoon profile picture

Give everyone the credit they deserve

Pair programming is more popular than ever. The benefits are clear: greater knowledge-sharing, less mental fatigue and better code, to name a few. It seems that the trend toward more collaborative coding will only grow in the future. In light of this, GitHub announced in late January 2018 that it now supports co-authored commits.

Why co-author?

Prior to this ability, pair programming meant that your GitHub activity would only reflect the commits which you personally made. When your partner was driving and you were navigating, your contribution was not recognized. With frequent role switching, this may not seem to matter all that much. The fact is, though, that you each only got half the credit you deserved. With co-authored commits, you both get full credit for every commit. And there doesn’t seem to be a limit on the number of co-authors, allowing for even more collaborative contributions (perhaps a whole class working together on a project).

How to co-author

Taking advantage of this new feature is easy. The exact steps depend on where you make your commit (command line, website, or desktop app), but the process is essentially the same. After your commit message, add a “trailer” with the following format:

Co-authored-by: Partner Name [email protected]

Just make sure you leave a blank line before the Co-authored-by, and you should be all set. See the official GitHub help document if you need more specific instructions.

Now that you know how, start co-authoring your commits today!