Git Cheat Sheet
Setup User name: git config --global user.name "[firstname lastname]" Email: git config --global user.email "[valid-email]" Color: git config --global color.ui auto Initialization and cloning Make your current folder a git repo: git init Clone a repo: git clone [url] Staging and commits Get status of staged, unstages and untracked files: git status Add files to staging: git add [file] Remove a file from staging: git reset [file] Remove a file from staging and remove all changes: git reset --hard [file] Differences in files that are modified but not staged: git diff Differences in files that are staged but not committed: git diff --staged Commit changes: git commit -m "[message]" Commit only specific portion of a file: git add -p [file] Note: Git will go into interactive mode and prompt options for actions on each hunk.