|
git config --global user.name "[name]"
|
|
git config --global user.email "[email address]"
|
|
git config --global color.ui auto
|
|
git init [dir-name]
|
|
git clone [url]
|
|
git remote add [origin] [url]
|
|
git remove -v (list of remote)
|
|
git remote remove [origin]
|
|
git add [File|.|-A]
|
|
git status
|
|
git diff --staged
|
|
git commit [-m|--amend|-am] "texto" (Dont amend published commits)
|
|
git tag -a 1.1 -m "Descripcion" [HASH]
|
|
git tag -l
|
|
git tag -d [HASH]
|
|
git push --tags
|
|
git log --graph|--oneline
|
|
git log -p file
|
|
git blame archivo
|
|
git reflog
|
|
git 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)
|
|
git 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
|
|
git stash
|
|
git stash list
|
|
git stash apply
|
|
git stash drop
|
|
git cherry pick [HASH]
|
|
git fetch origin [branch]
|
git pull origin [branch]
|
|
git push -u origin branch
|
|
|
git grep "hola mundo" [v2.x]
|
|
git mv [old-name] [new-name] (move o change name case-sensitive)
|
|
git rm -r --cached .
|
|
git add .
|
|
git commit -m "Remover archivos accidentalmente agregados al commit antes de ser añadidos al .gitignore"
|
|
touch .gitkeep
|
|
folder_with_tmp_files/*
|
|
!folder_with_tmp_files/.gitkeep
|
|
[apt|brew] install git-flow
|
|
git flow init
|
|
git flow feature
|
start
|
[feature-name]
|
|
finish
|
[feature-name]
|
|
|
publish
|
[feature-name] (send to remote)
|
|
|
track
|
[feature-name] (get remote feature)
|
|
git flow release
|
start
|
[release-name] [optional base hash in dev]
|
|
publish
|
[release-name]
|
|
|
track
|
[release-name]
|
|
|
finish
|
[release-name]
|
|
git flow hotfix
|
start
|
[hotfix-name] [optional base hash in dev]
|
|
finish
|
[hotfix-name]
|
No comments yet.
Cheatography n. The art of mapping complex subjects into clear, instantly navigable reference guides.