| ... | ... | @@ -22,7 +22,8 @@ |
|
|
|
- "Oh sh*t" moments
|
|
|
|
```
|
|
|
|
git checkout -- <FILE> // Reset changes to a specific file
|
|
|
|
git merge --abort // Abort a merge if there are any conflicts
|
|
|
|
git merge --abort // Abort a merge if there are any problems
|
|
|
|
git rebase --abort // Abort a rebase if there are any problems
|
|
|
|
git reset <HASH> // Soft reset to given hash (only removes commit)
|
|
|
|
git reset --hard <HASH> // Hard reset to given hash (also removes all physical changes)
|
|
|
|
|
| ... | ... | @@ -45,7 +46,7 @@ |
|
|
|
git push -u origin <BRANCH> // Push the local branch to origin
|
|
|
|
```
|
|
|
|
|
|
|
|
- Merging
|
|
|
|
- Merging/rebasing
|
|
|
|
```
|
|
|
|
git merge <BRANCH> // Merge branch into the current one
|
|
|
|
git rebase <BRANCH> // Move all of the current commits to the top of branch
|
| ... | ... | |