How to link to a Git commit in Redmine after pushing

We have Redmine set up to automatically link commits with related issues if the developer properly tags if (such as #Refs or #Fixes). However, we have had some commits that were pushed to the remote repo without those tags, and we now wish to connect them. How can we do this?

  • Git is using Vim for Commit messages
  • Transfer code from one computer to another via Git
  • git change all history for committers names and email for specific committer
  • Renaming with Git: Using git mv vs deleting a file and adding another
  • Git default merge commit message not including conflicts
  • Proper Commit Messages
  • How do pull no fast-forward in TortoiseGit
  • Git: ability to stage a certain file content without touching the working tree
  • How to gitignore *only* files?
  • How to set a VSPROPS variable only if it does not already exist?
  • Switch Branch/Tag with nodegit
  • why merge does not cause conflict
  • One Solution collect form web for “How to link to a Git commit in Redmine after pushing”

    To add a link to a specific commit, simply add commit:<sha-of-commit>.

    So if I were linking to a commit with a SHA of d675f2e5cd6bd87f45246422a79b0c4b93f366c4, then I would click on “update” and then in the notes section I would put, commit:d675f2e5cd6bd87f45246422a79b0c4b93f366c4. You can also use the short SHA if you’d like.

    You can follow the new link that you just created, which should take you to the repository section that contains that commit (if Redmine is properly set up to integrate with Git, which it sounds like it is). From there you can click “Add related issue” and then enter the bug or feature number. This will show a cool gray box with the commit message next to the bug notes when viewing the bug details.

    Hope that helps.

    Git Baby is a git and github fan, let's start git clone.