Braineos
DiscoverChallengesBlog
Sign in
← Back to decks
Sign in to save your progress, vote, and build your own decks.Sign in

Git Commands

Everyday git commands and what they do.

14 cards·by User 7f3a
Study this deck

Where this fits

git

No other decks with this tag yet.

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.