🌲

Git Cheatsheet

Basics

git init
Initialize a local Git repository
git clone
Clone a repository into a new directory
git add
Add file contents to the index
git commit
Record changes to the repository

Branching

git branch
List, create, or delete branches
git checkout
Switch branches or restore working tree files
git merge
Join two or more development histories together

Remote

git push
Update remote refs along with associated objects
git pull
Fetch from and integrate with another repository or a local branch
git remote
Manage set of tracked repositories