0

I had a repo on github called "A", with a local copy. I then modified the name of the repo from "A" to "B" and assigned the former name ("A") to a new, different remote repo. I forgot to correct the link on the local repo (git remote set-url origin link); so the local repo now is connected to the second remote repo (that took the name "A"). Without thinking about this i pushed a commit from local to remote and clearly this was assigned to the wrong remote repo. Now I know how to change in the local repo the link to the remote (see here for example), my question is:

how do I cancel from the remote repo the wrong commit I pushed?

user1172131
  • 103
  • 7
  • https://stackoverflow.com/a/32840254/1075282 : `If you pushed to GitHub, force pushing is not enough, delete the repository or contact support` – Renat Aug 16 '23 at 13:31
  • 2
    @Renat this only applies if the commit(s) contained sensitive information – knittl Aug 16 '23 at 13:33

0 Answers0