Created
October 20, 2016 13:20
-
-
Save tomcask/22a7a80701e5019e7e1eae4c0cd8dd6f to your computer and use it in GitHub Desktop.
This file contains 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
#Reload HEAD | |
###### Have to do every morning and evening | |
```bash | |
$> (master): git fetch origin master | |
$> (master): git status | |
$> (master): git pull origin master | |
$> (master): git checkout feature#id | |
$> (feature#id): git merge --no-ff master | |
``` | |
##Branchs | |
- Delete branch: ```$> git branch -D branchName``` | |
- Create branch: ```$> git checkout -b branchName``` | |
- Show branch: ```$> git branch //* asterisco es donde estamos``` | |
- Move between branches: ```$> git checkout branchName``` | |
- Merge branch: ```$> git merge -no-ff branchSourceName``` | |
##Changes | |
- Add files: ```$> git add fileName``` | |
- Add show changes: ```$> git add -p``` | |
- Unstage files: ```$> git reset HEAD filename``` | |
- Discard changes: ```$> git checkout --filename``` | |
- Commit changes: ```$> git commit -m "task #issueId description [bugfix][dirty]"``` | |
##Remotes | |
- Clonear repo: ```$> git clone repoUrl``` | |
- Refresh HEAD: ```$> git fetch origin branchName``` | |
- Merge remote branch: ```$> git pull origin branchName``` | |
- Upload changes: ```$> git push origin branchName``` | |
##Alias | |
- ```$> git config --global alias.co checkout``` | |
- ```$> git config --global alias.lg "log --oneline"``` | |
##Push | |
add files en feature branch | |
comit en feature branch | |
ir a master, (o la branch a actualizar) | |
Merge feature: $>git merge -no-ff branchSourceName | |
push master | |
salir del master NO TOCAMOS MASTER |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment