,

My personal GIT cheat sheet

Autocomplete
You can use [tab] to autocomplete remote and branch names

Delete modifications in a file

git checkout [file]
Checks modifications/diff

git diff -- [file] List branches

git branch -av
Switch to a branch

git checkout [branch]
Create a new local branch

git checkout -b [new_branch]
Delete a local branch

git branch -d [branch]
Re-edit the last commit message

git commit --amend -m "New commit message
Erase modifications and get the version from master

git checkout master -- [file]
Merge master into a branch

(git checkout master git pull git checkout [branch] ) git merge master [file]
Changing branch/pulling withlut commiting the current changes

git stash [do your stuff] git stash pop