The first three locations are on your machine.
Git does not have to be used with a remote server.
Use "git add" to move a file from working directory to staging.
Use "git commit" to move a file from staging into history.
Use "git push" to move a file from history to the remote server.
Files can be in 5 different states.
Staged tracked. (Committed)
The typical daily work process is:
Use "git add" to move your changes from working directory to staging.
Use "git commit" to move your changes from staging into history.
Use "git pull" to fetch and merge others' changes into your copy.
Use "git push" to send the merged changes from history to the remote server.
"git clone" does your initial checkout of a preexisting branch.
"git fetch" fetches remote changes but does not do a merge.
"git pull" fetches remote changes and then does merges those with your committed changes.
"git push" move changes from history to the remote server.
"git diff" compares working to staged.
"git diff --staged" compares staged to history.
"git diff HEAD" compares working to both staged and history.
"git diff -w" ignores whitespace differences.
"git diff branch1..branch2" prints differences between two branches.
"git log -- file" prints changes to one file.
"git log -S string" searches the log for a string.
"git log --decorate --graph" pretty prints the log.
"git log -G regex"
"git branch" shows all branches.
"git branch -r" shows remote branches.
"git branch name" creates a new branch.
"git branch name hashcode" creates a new branch at a specific checkin.
"git branch -m oldBranchName newBranchName" renames a branch.
"git checkout branch" switches to a branch.
"git checkout -b branch" creates and switches to specified branch.
"git branch -d branch" deletes a branch.
"git branch -D branch" forces the deletion of a branch.
"git remote add branchName URL" connects your branch to the remote server URL.
"git push -u origin branchName" sends your branch to the remove server.
"git mv file1 file2" moves/renames a file within git.
"git rm file" removes both working and staged copies of a file.
"git ignore file" tells git to never check in a file.