Last active
August 29, 2015 14:02
-
-
Save RoesWibowo/d2ceb180fcf1fe82de99 to your computer and use it in GitHub Desktop.
Git Command
This file contains hidden or 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
* 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