Skip to content

Instantly share code, notes, and snippets.

@cliffparnitzky
Last active December 18, 2020 22:10
Show Gist options
  • Save cliffparnitzky/4159798 to your computer and use it in GitHub Desktop.
Save cliffparnitzky/4159798 to your computer and use it in GitHub Desktop.
Simple way to create a tag via git shell and push it to repo
# creat a tag (more infos at: http://git-scm.com/book/de/ch2-12.html)
git tag -a 1.0.0 -m "Version 1.0.0"
git push origin 1.0.0
git tag -a 1.0.0.alpha1 -m "Version 1.0.0 alpha1"
git push origin 1.0.0.alpha1
# delete a tag
git tag -d 1.0.0
git push origin :refs/tags/1.0.0
@cliffparnitzky
Copy link
Author

Amending the commit message

git commit --amend
git push -f

@cliffparnitzky
Copy link
Author

Clean .git folder

git reflog expire --expire=now --all
git repack -ad
git prune

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