Created
February 26, 2014 18:22
-
-
Save johannez/12110224ee56b0f41249 to your computer and use it in GitHub Desktop.
Git commands
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Checkout branch for tracking old school. | |
git checkout --track -b dev origin/dev | |
# Undo local commits | |
git reset --hard | |
# Tag your release version and push it remote | |
git tag -a release-1.0 -m "Creating the first official version." | |
git push --tags origin master | |
# Create the zipped tar ball from HEAD | |
git archive --format=tar --prefix=projectname/ HEAD | gzip > filename.tar.gz | |
# projectname = Folder name when you extract the tar | |
# filename = filename of the tar | |
# To create a real tag and not a lightweight: | |
git tag -a v1.0.0 -m "Creating the first official version." | |
# To display the tag | |
git show v1.0.0 | |
# Show all available tags: | |
git describe --tags |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment