A quick reference for before your morning coffee.
- Basic
- Branching
- Rollback
- Restore file from a custom commit (in current branch)
- Tagging with semantic versioning
- Bower
- NPM
- Set remote
- Add remote
- Remove remote
#Branching ###Create a new branch
git checkout -b <name>
git checkout <name>
git checkout <branch to merge to>
git merge --no-ff <branch to merge from>
git branch -d <branch name>
git branch [-a]
-a
will list both local and remote branches
git checkout 6eb715d -- index.html
#Tagging with semantic versioning
bower version patch|minor|major
npm version patch|minor|major
git remote add <name> <address>
#Example: git remote add origin https://github.com/rileyjshaw/git-cheatsheet.git
git remote rm <name>