Last active
March 1, 2017 16:26
-
-
Save rizky/0dccf3e347196421326121ba579b0312 to your computer and use it in GitHub Desktop.
GIT Cheatsheet
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
#Add remote origin | |
git remote add origin $(github-address) | |
#Push to origin | |
git push -u origin master | |
#Create new branch | |
git checkout -b $(new-branch) | |
git push -u origin $(new-branch) | |
#Chechout branch | |
git fetch | |
git checkout origin/$(branch-name) | |
#Undu Pushed Commit | |
git reset --hard $(revision-id) | |
git push --force | |
#Setup Sync github | |
[remote "origin"] | |
url = $git-url | |
fetch = +refs/heads/*:refs/remotes/origin/* | |
[branch "master"] | |
remote = origin | |
merge = refs/heads/master |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment