Git 2 cheatsheet

Git 2: Getting started

6 common Git 2 tasks.

Check the Git version

Print the installed Git version.

git --version

Set your name

Set the name recorded on your commits, for every repository on this machine.

git config --global user.name "Your Name"

Set your email

Set the email recorded on your commits.

git config --global user.email "[email protected]"

Start a repository

Turn the current folder into a Git repository.

git init

Clone a repository

Download a repository and its full history.

git clone https://github.com/user/repo.git

See what has changed

Show modified, staged and untracked files.

git status

Was this page helpful?