Git
Tags
git tag -a v0.1 -m "tagname"
git tag v0.1
Delete
git tag -d v0.1
Branch
Create branch
git branch stage
Check what branch you are in
git status
git log --oneline --decorate
git branch -a
Switch branches or restore working tree files.
git checkout stage
push changes
git add .
git commit -m "blablabla"
git push -u origin stage
Merge
Change branch to master
git checkout master
Merge
git merge stage
Delete local
git branch -d stage
Delete remote
git push --delete origin stage
Merge conflicts
git status
FIND CONFLICT & FIX SHIT
git add .
git commit -m "blablabla"
git merge stage
Create a branch based off of master
git checkout -b stage master
Edit files
git commit -a -m "Adds new feature"
git checkout master
git rebase stage
Revert
git revert HEAD
or find a commit has with
git log --oneline --decorate
git revert
Git log
git log
git log --graph
git log --since="4 days ago"
git log -S
git log --stat
git log --shortstat
git log --pretty=format:"%h - %an - %ar - %s"
See diff before commit
Git diff
Remote
git remote show origin
Cleaning
git gc --prune
git gc --auto
git config gc.pruneexpire "30 Days"