mirror of
https://github.com/k88hudson/git-flight-rules.git
synced 2025-03-10 20:58:39 -03:00
added 'pulled from/into the wrong branch'
This commit is contained in:
parent
fc2ec9c64a
commit
ea87639b03
19
README.md
19
README.md
@ -373,3 +373,22 @@ README.md foo.txt
|
|||||||
```
|
```
|
||||||
|
|
||||||
Voila! We got our removed file back. Git reflog is also useful when rebasing goes terribly wrong.
|
Voila! We got our removed file back. Git reflog is also useful when rebasing goes terribly wrong.
|
||||||
|
|
||||||
|
<a name="pull-wrong-branch"></a>
|
||||||
|
## I pulled from/into the wrong branch
|
||||||
|
|
||||||
|
This is another chance to use `git reflog` to see where your HEAD pointed before the bad pull.
|
||||||
|
|
||||||
|
```
|
||||||
|
(master)$ git reflog
|
||||||
|
ab7555f HEAD@{0}: pull origin wrong-branch: Fast-forward
|
||||||
|
c5bc55a HEAD@{1}: checkout: checkout message goes here
|
||||||
|
```
|
||||||
|
|
||||||
|
Simply reset your branch back to the desired commit:
|
||||||
|
|
||||||
|
```
|
||||||
|
git reset --hard c5bc55a
|
||||||
|
```
|
||||||
|
|
||||||
|
Done.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user