git
git init - initialize a new repo
git status [ -s/--short ] - show modified files/directories
git add -A | git add --all - stage all changes
git add . - stage changes only in the current directory and subdirectories
git add * - stage new or modified files, not deleted ones
git add _FILE_ - stage only the specified file
git add *.txt - stage only .txt files
git reset - unstage all changes
git reset --hard - deletes all staged and unstaged changes
git reset _FILE_ - unstage only one file
git reset HEAD~ | git reset HEAD^ - undo the most recent commit
git clone _URL_ [ _DIRECTORY_ ] - retrieve the remote repo to local system
git commit -m "_COMMIT_MESSAGE_" - move from staging into commit; -a to both stage and commit; --amend to make a minor fix to a previous commit (it replaces it)
git config --global user.name "_NAME_" - set global username
git config --global user.email "_EMAIL_" - set global mail
git config --list - show config
git config --show-origin _KEY_ - show key's value
git rm _FILE_ - delete a file and stage the deletion; -f if it's already staged or modified
git rm --cached _FILE_ - removes the file from staging
git rm -r _FOLDER_ - remove the folder and its contents
git log [ --oneline ] - see commit history
git branch - list branches
git branch _BRANCH_ - create a new branch
git { switch [ -c] | checkout [ -b ]} _BRANCH_ - switch branch; flags to create the new branch
git checkout -- - unmodify a modified file
git merge _BRANCH_ -m "_MESSAGE_" - combine branches
git diff _COMMIT_ID_1_ _COMMIT_ID_2_ - show differences between commits
git push _REMOTE_ _LOCAL_ - send local changes to remote
git fetch - receive remote changes to local, but without merging
git pull - bring remote changes to local plus merging
git restore { _FILE_ | _DIRECTORY_ | . } - delete unstaged changes
git stash - temporarily store modified, tracked files in order to change branches
git revert - undo a commit, but not by deleting, but by a new commit
git rebase - rewriting branches, updating commits and clearing history