Search code examples
gitgitlabgit-fork

Git: How to Revert a Revert with FORK or GITHUBDesktop?


I need your help... I have a MAIN branch, and a STAGING branch. I commit and push some code from STAGING to MAIN but they were problems. So i reverted my work.

MAIN is now OK (but not to date, of course). My problem is GitHub (.com or DESKTOP) don't find any differences between STAGING and MAIN (while there is obviously).

enter image description here

I saw on StackOverflow that the problem was known, and that i needed to revert the revert.

Problem : i'm using FORK (or GitHub Desktop) only, and i don't understand how to do this

enter image description here

I tried "Reset Main to here", but nothing has changed...

enter image description here

Thanks A LOT for helping me!

Vincent


Solution

  • checkout your staging branch, using command just do: git revert 7ee232b and then git push, and then merge back to main.

    git reset also should work but you need to push again the changes. I think main should be protected against push so everything need to be done on the staging branch