Command
|
Description
|
git help
|
Show help information about git commands
|
git init
|
Init new git project in current folder (folder needs to be empty)
|
git clone git@github.com:myusername/myrepositoryname.git
|
Clone a git repository from github.com
|
git add --all
|
Stage all files (or `git add file.txt` for adding a single file)
|
git commit -m "my message"
|
Create a commit of your stages files (do not forget to stage your filesfiles/changes before that, e.g.: `git add --all`)
|
git pull
|
Pull updates from remote to current branch
|
git push
|
Push your commits to remote repository
|
git push --follow-tags
|
Push your commits + tags
|
git status
|
Show status of unstaged files, project info, branch info, ...
|
git branch
|
Show all git branches (option -a for showing remotes too)
|
git branch mynewbranch
|
Create a new branch
|
git checkout myotherbranch
|
Switch to another git branch
|
git log
|
Show latest git commits and messages (or "git show")
|
git fetch --all
|
Fetch from all remote repositories
|
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.
|
git tag --delete v0.1.0
|
Remove Tag "v0.1.0"
|
git revert commitHash
|
Revert changes of a specific commit
|