See the git-intro cheatsheet for the basics.
.gitdirectory: there are no files actually checked out. Directory names usually like
This excludes most introduced in the git-intro cheatsheet.
git clone <url> [<target-directory>]: Make a copy of existing repository at <url>, containing all history.
git status: Same as in basic git, list status
git remote [-v]: List all remotes
git graph: see a detailed graph of commits. Create this command with
git config --global alias.graph "log --all --graph --decorate --oneline"
git checkout <branch-name>: Make a branch active.
git push [<remote-name>] [<branch>:<branch>]: Send commits and update the branch on the remote.
git pull [<remote-name>] [<branch-name>]: Fetch and then merge automatically. Can be convenient, but to be careful you can fetch and merge separately.
git fetch [<remote-name>]: Get commits from the remote. Doesn’t update local branches, but updates the remote tracking branches (like origin/NAME).
git merge [<branch-name>]: Updates your current branch with changes from another branch. By default, merges to the branch is is tracking by default.
git remote add <remote-name> <url>: Adds a new remote with a certain name.