how do i undo a recent git push release and revert it to a previous version?

"git push origin ProductBranch"

If ProductBranch was previously pushed, you could force pushed its last state with:

git log ProductBranch
# make sure the history is the correct one, without your new commits
git push --force origin ProductBranch:ProductBranch

If ProductBranch was never pushed before, then you might consider deleting it on the remote side:

git push --delete origin ProductBranch

Then, simply switch to master and push that:

git switch master
git push -u origin master

If you had committed to the wrong branch, you can fix those commits back to master before pushing.

CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top