Show Menu
Cheatography

Git Cheat Sheet (DRAFT) by

My custom git cheat sheet

This is a draft cheat sheet. It is a work in progress and is not finished yet.

Basics

Add all to Staging
add .
Commit changes
commit -m [msg]
List branches
branch
Create new branch from existing
branch [new] [existing]
Delete local branch
branch -d [name]

Merge Feature

Get newest dev
checkout dev | pull
Merge dev into feature
checkout feat | merge dev
Resolve everything & test
Use VSCode
Commit & push
commit | push feature
Merge to dev
Github PR
Clean up
Delete on Github, branch -d feature, fetch -p
 

Remove tracked file

Add to .gitignore
echo "­pat­h/f­ile­" >> .gitignore
Remove from tracking
rm --cached "­pat­h/f­ile­"
Add & Push
add .gitignore | commit