mirror of
https://github.com/k88hudson/git-flight-rules.git
synced 2025-03-10 12:48:43 -03:00
ADD undo rebase/merge
Please correct my broken english :)
This commit is contained in:
parent
25bb25a82f
commit
2b34d20485
10
README.md
10
README.md
@ -46,6 +46,7 @@ For clarity's sake all examples in this document use a customized bash prompt in
|
|||||||
- [I accidentally deleted my branch](#i-accidentally-deleted-my-branch)
|
- [I accidentally deleted my branch](#i-accidentally-deleted-my-branch)
|
||||||
- [I want to delete a branch](#i-want-to-delete-a-branch)
|
- [I want to delete a branch](#i-want-to-delete-a-branch)
|
||||||
- [Rebasing and Merging](#rebasing-and-merging)
|
- [Rebasing and Merging](#rebasing-and-merging)
|
||||||
|
- [I want to undo rebase/merge](#undo-rebase)
|
||||||
- [I rebased, but I don't want to force push.](#i-rebased-but-i-dont-want-to-force-push)
|
- [I rebased, but I don't want to force push.](#i-rebased-but-i-dont-want-to-force-push)
|
||||||
- [I need to combine commits](#i-need-to-combine-commits)
|
- [I need to combine commits](#i-need-to-combine-commits)
|
||||||
- [Safe merging strategy](#safe-merging-strategy)
|
- [Safe merging strategy](#safe-merging-strategy)
|
||||||
@ -561,6 +562,15 @@ To delete a local branch:
|
|||||||
|
|
||||||
## Rebasing and Merging
|
## Rebasing and Merging
|
||||||
|
|
||||||
|
<a name="undo-rebase">
|
||||||
|
### I want to undo rebase/merge
|
||||||
|
|
||||||
|
You may have merge/rebase your current branch with a wrong branch, or you simply cannot manage to achieve a correct result or even finish the rebase/merge process. Git is saving the original HEAD pointer in ORIG_HEAD, so it is simple to recover you're branch at the state before the rebase/merge.
|
||||||
|
|
||||||
|
```sh
|
||||||
|
(my-branch)$ git reset --hard ORIG_HEAD
|
||||||
|
```
|
||||||
|
|
||||||
<a name="force-push-rebase"></a>
|
<a name="force-push-rebase"></a>
|
||||||
### I rebased, but I don't want to force push.
|
### I rebased, but I don't want to force push.
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user