re: Git commits: An Effective Style Guide VIEW POST


I saw something a co-worker does and I really liked it.

It is as simple as addind the Jira issue number and the short name of the person that did the commit.

Like "841-RickM-bug fixed bug blah blah"

Reading commits from the develop and master branch is pure joy this way. Like, everything makes sense.


We use BitBucket and Jira and when you add the issue number to the commit it links it in Jira too so you can go directly to the commit in BitBucket. Pretty cool stuff!


Why would you add the user's name? That only takes up room in the short version of the commit message, and you can see their name in the log anyway.


Cool, that also works like a charm, especially for short commits. On larger ones, you might need to add multiple lines ;)


or split up the long commit into several short ones :)

Of course! Just keep making sure that you can easily navigate through the commit history.


Adding the username and / or trello/jira id/hash to your git branch is also pretty helpful in a team environment.

Eg, instead of 'new-bug-fix' ... you can write 'jlyons-idea1234-new-bug-fix'


Isn't the author already recorded as part of the commit anyway?

code of conduct - report abuse