Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Assign git commit to github issue manually

Tags:

github

It is possible to assign existing commit to issue without using auto commit + issue integration (e.g. fixes #XXX, closed #XXX, etc. in commit title)?

like image 928
Marcin Rogacki Avatar asked Nov 16 '12 14:11

Marcin Rogacki


People also ask

How do you assign a commit to issue GitHub?

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 I reference a commit in GitHub?

To reference a commit, simply write its SHA-hash, and it'll automatically get turned into a link.

How do I reference a commit in a GitHub issue?

Luckily you can easily reference a commit in a Github issue by simply pasting in the hash which will automatically turn into a link. Most of you already know how to do that, but for everybody else, we’ll detail the couple of steps. First go find the commit in your repository. That’s easy enough, just click that “X commits” link.

How do I add changes to a git commit?

For this purpose, the git add command followed by the names of the files you made changes to and wish to commit are entered in the git terminal. That is, using this command includes the files whose changes need to be added to the next commit in the staging area.

How do I commit to a git repository?

Committing to git is incredibly easy using the GitHub desktop app. Once you’ve made the changes to your files in your text editor and saved them, open your GitHub desktop app. You will be able to view the changes made to the repository and the repository history. Make sure you have selected the branch you wish to commit the changes to.

What is gitgit commit?

git commit creates a commit, which is like a snapshot of your repository. These commits are snapshots of your entire repository at specific times. You should make new commits often, based around logical units of change. Over time, commits should tell a story of the history of your repository and how it came to be the way that it currently is.


2 Answers

Go on your commit and comment it with the *number of your issue** preceded by an hashtag (#6 for example). The commit will then be "referenced" in the issue timeline.

This is not the same as integrating the commit directly, but it gets closer to simply comment on the issue with the commit hash (which is also an alternative).

like image 183
brclz Avatar answered Sep 21 '22 22:09

brclz


It is not a fully satisfactory answer, but I noticed if we paste a link to the commit into comment, github automatically will add it as link-reference to it as a short hash.

input:

https://github.com/user/Repository/commit/a49c5c587185d3bee80a32e7fc4f9ea4e94289a8

output:

a49c5c5
like image 31
Marcin Rogacki Avatar answered Sep 25 '22 22:09

Marcin Rogacki