Skip to content

Instantly share code, notes, and snippets.

@RoesWibowo
Last active August 29, 2015 14:02
Show Gist options
  • Save RoesWibowo/d2ceb180fcf1fe82de99 to your computer and use it in GitHub Desktop.
Save RoesWibowo/d2ceb180fcf1fe82de99 to your computer and use it in GitHub Desktop.
Git Command
* Prepare local git:
`git remote add origin url`
* Update local:
`git pull origin [branch]`
`git push origin [branch]`
* Update server:
`git add [files]`
`git commit -m "[message]"`
`git push origin [branch]`
* Add branch
`git checkout -b [branch]`
* Delete branch
`git branch -d [branch]`
`git push --branch`
* Merge branch
`git checkout branch1`
`git merge branch2`
* Add tag and commit:
`git tag -a [tag] -m "[message]"`
`git push --tags`
* Remove tag:
`git tag -d [tag]`
`git push origin :[tag]`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment