Sign in to save your progress, vote, and build your own decks.Sign in
git init
Create a new empty Git repository in the current directory.
git clone <url>
Copy a remote repository to your machine.
git status
Show changed, staged and untracked files.
git add <file>
Stage changes for the next commit.
git commit -m "msg"
Record staged changes with a message.
git log
Show the commit history.
git diff
Show unstaged changes compared to the last staged state.
git branch
List, create or delete branches.
git checkout -b <name>
Create a new branch and switch to it.
git switch <branch>
Switch to an existing branch.
git merge <branch>
Merge another branch into the current one.
git pull
Fetch from the remote and merge into the current branch.
git push
Upload local commits to the remote.
git stash
Temporarily shelve uncommitted changes. Use `git stash pop` to reapply the most recent stash and remove it from the stash list.