Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Github commit message links

Tags:

git

github

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.

like image 531
Mikulas Dite Avatar asked Sep 30 '10 15:09

Mikulas Dite


People also ask

Can you add a link to git commit message?

How to Link Commits to GitHub Issues. If you use the correct format in your commit message, your commit will be automatically linked to a GitHub Issue or Pull Request. To do this, put a # followed the Issue or Pull Request number. This will automatically create a link in the commit message.

How do you reference an issue in a commit?

You just need to include #xxx in your commit message to reference an issue without closing it. With the new GitHub issues 2.0, you can use these synonyms to reference an issue and close it (in your commit message).

How do I reference a PR on GitHub?

Use #1234 in a comment to reference pull request 1234 from the current repo. Show activity on this post. For example, https://github.com/jlord/sheetsee.js/issues/26 will render as jlord/sheetsee. js#26.


1 Answers

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 :)

like image 53
antitoxic Avatar answered Sep 23 '22 15:09

antitoxic