Just a short add to the above text. Force push does not actually delete remote commits. It changes the pointer on the remote to point to a different commit. Depending on what your remote actually is (gitlab/github/other) it might take a significant time (or forever) until your now non-referenced commit is actually garbage collected. So do not assume that this actually cleans up anything that was leaked.
Comments about How to Delete Commits From Remote in Git
Good job!
😊+
😊+
😊+
😊+
Just a short add to the above text. Force push does not actually delete remote commits. It changes the pointer on the remote to point to a different commit. Depending on what your remote actually is (gitlab/github/other) it might take a significant time (or forever) until your now non-referenced commit is actually garbage collected. So do not assume that this actually cleans up anything that was leaked.
😊+
Great breakdown on this topic! Good job
😊+