Syntax: git init [repository name]
initialize an existing directory as a Git repository
Syntax: git add [file]
add a file as it looks now to your next commit (stage)
Syntax: git commit -m “[descriptive message]”
commit your staged content as a new commit snapshot
Syntax: git status
show modified files in working directory, staged for your next commit
Syntax: git log
show all commits in the current branch’s history
Syntax: git branch [branch-name]
create a new branch at the current commit
Syntax: git checkout [branch-name]
switch to another branch and check it out into your working directory
Syntax: git merge [branch-name]
merge the specified branch’s history into the current one
Syntax: git pull <remote> <branch>
fetch and merge any commits from the tracking remote branch
Syntax: git push [alias] [branch]
Transmit local branch commits to the remote repository branch
Syntax: git mv [existing-path] [new-path]
change an existing file path and stage the move
Syntax: git clone [url]
retrieve an entire repository from a hosted location via URL
Syntax: git remote add [alias] [url]
add a git URL as an alias
Syntax: git fetch [alias]
fetch down all the branches from that Git remote
Syntax: git diff
diff of what is changed but not staged
Syntax: git tag/git tag <tag-name>
Lists or creates tags
Syntax: git stash
Save modified and staged changes
Syntax: git reset [file]
unstage a file while retaining the changes in working directory
Syntax: git revert <commit>
reverts changes made in a previous commit
Syntax: git rm [file]
delete the file from project and stage the removal for commit
Syntax: git log branchB..branchA
show the commits on branchA that are not on branchB
Syntax: git log --follow [file]
show the commits that changed file, even across renames