Using Commits with the Shortcut VCS Integrations

For smaller Stories like hot fixes, you can associate an individual commit with the Story. Typically, these commits are pushed directly into "production" or on to an intermediary branch like “Develop”. The mechanism for doing so is similar to associating a feature branch. You can simply use the Story URL:<MYORG>/story/<story number>/<story-name> 

or bracketed text  [sc-###] where “###” is the Story ID anywhere within the commit message.


You can also do this in the VCS provider UI when adding the initial commit message.




Changing Your Workflow State with GitHub Commit Messages

It is also possible to change the workflow state of a Story via additional bracketed text commands within a commit message. To move the story to a "Finished" workflow state (as defined in your organization’s workflow), include your organization's designated finish verb and the story ID in brackets in the last commit that you push (click here to read more about setting up and using verbs and workflow states in Shortcut). 


Shortcut will also add you as Owner to an unowned Story when GitHub activity is detected and all merge events in GitHub handlers will affect commits as well as branches. 

Associating Multiple Stories with a Single Branch using Git Commits

Branches can be associated with multiple stories using commit messages to . Just add the Story numbers with the prefix `sc-` in brackets to the commit message. 

For example:  git commit -m "Fixing this [sc-123][sc-234][sc-345]"

Disassociating Commits from a Shortcut Story

Commits can be removed from Shortcut Stories by clicking on the trash can icon next to the commit within the Story:


Re-associating Commits to a Shortcut Story

Commits can be re-associated with Shortcut Stories by clicking the "Restore" button next to the commit in the Story's Activity section:


Moving Stories Back

The Shortcut GitHub integration is designed to move your Stories from unstarted to completed. As such, if you find you need to move a Story back to an earlier workflow state you will need to do so in the Shortcut UI.


Was this article helpful?

1 out of 1 found this helpful

Have more questions? Submit a request