I want to cancel my last push, because a pushed the app/build folder changes Is it possible to revert a push or the last push in Gitlab?
Asked
Active
Viewed 2.2k times
6
-
Thanks for your constructif answer. – medlamine Semassel May 23 '16 at 12:31
-
Do a hard reset to the previous commit....? – ʰᵈˑ May 24 '16 at 15:58
-
Yes, I tried I hard reset and I pushed it on GitLab, and it works Thanks. – medlamine Semassel May 25 '16 at 07:54
1 Answers
8
Either you can delete the commit locally and use force push or create a revert commit via GitLab UI (GitLab 8.5 or newer):
Select your commit in the history you want to revert and click on the revert button:
There will be a modal dialog. You can choice if you want to create a Merge Request or directly commit it to the default branch:
-
Thanks a lot CSchulz, but I am on the 8.0.5 version, I suppose i can't see the revert option. – medlamine Semassel May 25 '16 at 07:51
-
-
In this case you have done the same as described in the linked answer. – CSchulz May 25 '16 at 11:38
-
2By this way the wrong commit remains in the history. Is there any way to erase it as it never happened? – Angelo Mascaro Dec 14 '17 at 10:34