Cheatography
https://cheatography.com
Configgit config --global user.name "[name]" | git config --global user.email "[email address]" | git config --global color.ui auto |
Initgit init [dir-name] | git clone [url] | git remote add [origin] [url] | git remove -v (list of remote) | git remote remove [origin] |
Stagegit add [File|.|-A] | git status | git diff --staged | git commit [-m|--amend|-am] "texto" (Dont amend published commits) |
Taggit tag -a 1.1 -m "Descripcion" [HASH] | git tag -l | git tag -d [HASH] | git push --tags |
Loggit log --graph|--oneline | git log -p file | git blame archivo | git reflog |
| | Resetgit reset --soft [HASH] (solo commit) | git reset --mixed [HASH] (solo commit y staging) | git reset --hard [HASH] (commit, staging y worktree) | git reset --hard HEAD (undone current work) | git reset HEAD (undone git add) | git checkout HEAD "file" (undone current work of file) |
Branchgit branch "name" | git checkout -b "name" | git branch [-av] (local and remote) | git branch -m "old-name" "new-name" | git checkout "HASH" (temp view of hash) | git merge "branch2" (merge current-branch with branch2) | git branch -d |
Stashgit stash | git stash list | git stash apply | git stash drop |
Fetch, pull, pushgit fetch origin [branch] | git pull origin [branch] | git push -u origin branch |
Search, renamegit grep "hola mundo" [v2.x] | git mv [old-name] [new-name] (move o change name case-sensitive) |
| | Remove wrong files commited before gitignoregit rm -r --cached . | git add . | git commit -m "Remover archivos accidentalmente agregados al commit antes de ser aƱadidos al .gitignore" |
Keep folderstouch .gitkeep | folder_with_tmp_files/* | !folder_with_tmp_files/.gitkeep |
git-flow[apt|brew] install git-flow | git flow init |
Featuregit flow feature | start | [feature-name] | | finish | [feature-name] | | publish | [feature-name] (send to remote) | | track | [feature-name] (get remote feature) |
Releasegit flow release | start | [release-name] [optional base hash in dev] | | publish | [release-name] | | track | [release-name] | | finish | [release-name] |
Hotfixgit flow hotfix | start | [hotfix-name] [optional base hash in dev] | | finish | [hotfix-name] |
|
Created By
Metadata
Comments
No comments yet. Add yours below!
Add a Comment
Related Cheat Sheets