Skip to content

Instantly share code, notes, and snippets.

@hezhao
Last active March 19, 2017 09:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hezhao/343af4c9dae7f264ac9afb8f38970d2c to your computer and use it in GitHub Desktop.
Save hezhao/343af4c9dae7f264ac9afb8f38970d2c to your computer and use it in GitHub Desktop.
Git commands
# Create a new branch locally
$ git checkout -b [branch]
# Create and push the new branch to orign
$ git push origin [branch]
# Merge branch to master
$ git checkout master
$ git merge [branch]
# Remove remote branch
$ git push origin --delete [branch]
# Update tags
$ git tag -d <tagname>
$ git tag -f -a v0.1
$ git push -f --tags
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment