Let's say you accidentally commited a wrong commit to a branch or a commit to the wrong branch. What do you do?
Thankfully, Git allows you to delete the commit on remote.
Here is how.
git pull origin mybranch
git reset HEAD^ --hard
git push origin-f mybranch
More detailed info can be found here.
No comments:
Post a Comment