gitlab After synchronization latest branch would like to roll back

We first need to know which version you want to go back retreated

Go reflogHere Insert Picture Description

You can see the display better version, and then you will need to find their own version rollback

Then operation

git reset version number --hard want fallback

Here Insert Picture Description

Then you can see HEAD is now at version number

This proves returned to the

But when you merge in gitlab, we have found that no change ah? ? ? ? Suspect returned really come? ? ?

Then do not worry, calm! ! !

Look at your local code is not the version you want? ? ? ?

If so, then execute a command

git push origin of your branch -f

For example: git push origin dev-leijia -f

Re-look remote code that does not like you, ha ha ha, simple bar

Published 149 original articles · won praise 166 · views 40000 +

Guess you like

Origin blog.csdn.net/weixin_44369568/article/details/103251603