How can I rewind my work on top of FETCH_HEAD

After I pulled from the remote repository, I received the following messages:

  • branch develop β†’ FETCH_HEAD First, rewind your head to play your work on top of it ... Fast-forwarded my_topic for f05183b231e55864ae8d99db9456167af3413b6a

So how could I rewind my work on top of FETCH_HEAD?

+3
source share
2 answers

The message is a confirmation of the success of git - it does not ask you to do anything.

if you want to check that the branch contains a specific commit:

git branch --contains <hash>

This is not related to the question of how it was asked, but if you want to place the commits on top of the others - where git rebaseit enters - to re-order the commits.

eg.

git checkout master
...
git commit -vam "one"
...
git commit -vam "two"
...
git checkout somebranch
...
git commit -vam "three"
...
git commit -vam "four"

+ + . :

git rebase master

:

git cherry-pick <hash>

git reflog, , , , .

+7

? ,

git status

, , .

+1

All Articles