**Command**
| **Description**
|
```shell
git help
```
| Show help information about git commands
|
```shell
git init
```
| Init new git project in current folder (folder needs to be empty)
|
```shell
git clone git@github.com:myusername/myrepositoryname.git
```
| Clone a git repository from github.com
|
```shell
git add --all
```
| Stage all files (or `git add file.txt` for adding a single file)
|
```shell
git commit -m "my message"
```
| Create a commit of your stages files (do not forget to stage your files/changes before that, e.g.: `git add --all`)
|
```shell
git pull
```
| Pull updates from remote to current branch
|
```shell
git push
```
| Push your commits to remote repository
|
```shell
git push -u origin master
```
| Push your commits to (new) remote repository and set local branch to track remote branch upstream (-u is equal to --set-upstream). Useful if you don't have any upstream set up yet.
|
```shell
git push --follow-tags
```
| Push your commits + tags
|
```shell
git status
```
| Show status of unstaged files, project info, branch info, ...
|
```shell
git branch
```
| Show all git branches (option -a for showing remotes too)
|
```shell
git branch mynewbranch
```
| Create a new branch
|
```shell
git checkout myotherbranch
```
| Switch to another git branch
|
```shell
git log
```
| Show latest git commits and messages (or "git show")
|
```shell
git fetch --all
```
| Fetch from all remote repositories
|
```shell
git tag -a v0.1.0
```
| Tag current as "v0.1.0" (or `git tag -am "My Release Message" v0.1.0`). You can use `git push --follow-tags` to push all your tags to the remote.
|
```shell
git tag --delete v0.1.0
```
| Remove Tag "v0.1.0"
|
```shell
git revert commitHash
```
| Revert changes of a specific commit
|