-
Notifications
You must be signed in to change notification settings - Fork 12
Git
kimschles edited this page Jan 2, 2019
·
7 revisions
git --help
git help -a
git status
git log --oneline
git log --oneline --all
git log --oneline --all --decorate
rebase
-
rebase -i
<- This one gives you options and explanations. :) - Usually, the command is
git merge -i origin/master
- A merge preserves your branch history, while rebase does not.
- A merge is useful for combining changes that are public
- Rebase is good for combining changes that are only on your machine
git show-ref
See the difference between two different shas
-
git diff sha~sha2
See the difference between your head and the last commit git diff HEAD~1
Revert
-
git revert sha
Revert a merge commit (choose the first sha) git revert -m 1
Add a git tag:
* git tag 2.1
Look at git tags:
* git tag
Push up a git tag:
* git push origin --tags
-
https://learngitbranching.js.org/
- Find
rebase
under ‘Advanced Topics’
- Find
- https://www.shortcutfoo.com/app/dojos/git
- https://www.youtube.com/watch?v=tukOm3Afd8s
- https://www.youtube.com/watch?v=dO9BtPDIHJ8
- https://www.youtube.com/watch?v=SxzjZtJwOgo
Look at your SSH env variable(s):
env | grep -i git
-
-i
means to ignore case. You can also use--ignore-case