# Git Cheat Sheet

## Configuration
```
$ git config --global user.name "FirstName LastName"
$ git config --global user.email "you@domain.com"
$ git config --global color.ui true
$ git config --list
```


## Starting a repository
```
$ git init
$ git status
```


## Staging files
```
$ git add <filename>
$ git add .
$ git add --all
$ git add -A
$ git rm --cached <filename>
$ git reset <filename>
```


## Commit to repository
```
$ git commit -m "your message here"
$ git reset --soft HEAD^
$ git commit --amend -m <your message here>
```


## Pulling and pushing
```
$ git remote add origin <link>
$ git push -u origin master
$ git clone <link>
$ git pull
```


## Branching
```
$ git branch 
$ git branch <branch-name>
$ git checkout <branch-name>
$ git checkout -b <branch-name>
$ git merge <branch-name>
```


See you later.
