Mikulas Dite
Mikulas Dite

Reputation: 7941

Github commit message links

Is it possible to create a commit message with link to other repository commit?

Eg. something like [Username\Repo\commitHash]

Usage example: if some bc break would happen in some framework's commit, I'd like to link to this very commit in my own commits updating my code which uses this framework.

Upvotes: 46

Views: 43087

Answers (2)

antitoxic
antitoxic

Reputation: 3834

I was searching for something like this myself. Found it on:

https://help.github.com/articles/autolinked-references-and-urls/#commit-shas

<<username>>/<<repo>>@<<commitHash>>

Without the angle brackets of course :)

Upvotes: 62

sleepynate
sleepynate

Reputation: 8036

I don't think there's anything stopping you from putting something like:

http://github.com/pkrumins/lulzbot/commit/4c1b1ea95b379805e3b595b511a89affc6811145

Right in your commit message. While this doesn't link directly to the git object's version of the commit... it leads to a page showing that commit.

Format is github.com/User/Repo/commit/hashtag

Upvotes: 0

Related Questions