Skip to content

Instantly share code, notes, and snippets.

@sanemat
Created June 6, 2011 15:46
Show Gist options
  • Save sanemat/1010496 to your computer and use it in GitHub Desktop.
Save sanemat/1010496 to your computer and use it in GitHub Desktop.
heroku git tag deployment
$ git push -f heroku release-20110606^{}:master
# I don't know [tag]^{}
@edmundo096
Copy link

edmundo096 commented May 19, 2022

My explanation (may be wrong): This is for annotated Tags (the preferred ones as they are objects with metadata such as tag author and date). This gets the commit referenced from the tag object. For lightweight tags, just remove the ^{}.

The ^{} requires escaping on Windows, i.e. git push -f heroku "release-20110606^{}:master"
An alternative seems to be ~0 (or ^0) in place of the ^{} (see https://stackoverflow.com/a/1863712/2012945).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment