4 ms·
Well if you want to know how to unpush, here's how. You can also use this to just uncommit locally if you made a mistake, too. >git reset --soft HEAD^ That pr
by Subsentient 6y ago
Well if you want to know how to unpush, here's how. You can also use this to just uncommit locally if you made a mistake, too.
>git reset --soft HEAD^
That preserves your work, but it uncommits it. You can now make changes, re-add files, and recommit. If you want to destroy the last commit instead, replace --soft with --hard.
>git push origin +mybranch
The plus sign forces an overwrite of the remote branch.
I've used this technique countless times, for years. It works fine.