Git
GIT
Tags
Loggit 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 List--decorate
whichgit filesbranch have-a
Switch been modifiedbranches or stagedrestore locally
tree files.
git statuscheckout
Commitstage
push changes
git add .
git commit -m "Fixed Something"blablabla"
git push -u origin master
stage
Merge
Pull
gitbranch initto master
git
Merge
Fetch
git fetchmerge stage
Delete local
git branch -d stage
Delete remote
git push --all
delete origin stage
Merge conflicts
Changesgit thestatus
FIND CONFLICT & FIX SHIT
git add .
git commit -m "blablabla"
git merge stage
Create a branch based off of themaster
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 set-urlshow origin
http://git.myhypervisor.ca/myhypervisor/project.git
Cleaning
Create a remote repo pointing on your existing GitHub repository
git remotegc add--prune
origingit http://git.myhypervisor.ca/myhypervisor/project.gc --auto
git
config gc.pruneexpire "30 Days"