Last active
April 25, 2017 16:07
-
-
Save ruben-rodriguez/b81c48bbdd31a7ac2e4b9afcf9ffa576 to your computer and use it in GitHub Desktop.
GIT CMD
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
CONFIGURING: | |
$ git config --global user.name “NAME” | |
$ git config --global user.email “[email protected]” | |
CLONING: | |
$ git clone https://github.com/ermus19/meteo.git | |
UPDATING: | |
$ git pull | |
SCRIPTS EXEC PERMISSIONS: | |
$ git update-index --chmod=+x <SCRIPT_NAME> | |
BRANCHING: | |
$ git checkout -b <NEW_BRANCH_NAME> | |
CHANGE TO BRANCH: | |
$ git checkout <BRANCH_NAME> | |
MERGE & REBASE: | |
$ git merge | |
$ git rebase | |
PUSHING: | |
$ git add . | |
$ git commit -m “COMMIT MESSAGE” | |
$ git push origin <BRANCH_NAME> | |
Changing remote: | |
$ git remote rm origin (or name) | |
$ git remote add <name> <url> | |
Delete last pushed commit to remote: | |
$ git push -f origin HEAD^:master | |
Edit commit without pushing: | |
$ git commit --amend -m "NEW COMMIT MESSAGE" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment