The process of adding a file and commiting before pushing
Cheatsheet
git add
Add contents of new or changed files to the index. The “index” (also known as the “staging area”) is what you use to prepare the contents of the next commit.
git add -p/--patch: select parts (hunks) interactivelygit add -A/--all: add changes from all tracked and untracked files
git diff
Show changes between the working tree and the index or a tree, changes between the index and a tree, changes between two trees, changes resulting from a merge, changes between two blob objects, or changes between two files on disk.
git diff --cached: compares a commit and the index
git pull
Integrate changes from a remote repository into the current branch.
First, git pull runs git fetch with the same arguments (excluding merge options) to fetch remote branch(es). Then it decides which remote branch to integrate: if you run git pull with no arguments this defaults to the upstream for the current branch. Then it integrates that branch into the current branch.
git pull --all: runsgit fetch --allgit pull --prune: remove any remote-tracking references that no longer exist on the remote.git pull --all --prune --rebase --autostash
git status
Displays paths that have differences between the index file and the current HEAD commit, paths that have differences between the working tree and the index file, and paths in the working tree that are not tracked by Git (and are not ignored by gitignore). The first are what you would commit by running git commit; the second and third are what you could commit by running git add before running git commit.
git status -s: short status