danb35
Hall of Famer
- Joined
- Aug 16, 2011
- Messages
- 15,504
I thought I knew what I needed to know about git--apparently I knew just enough to be dangerous. I inadvertently messed up the repo for my Nextcloud script (https://github.com/danb35/freenas-iocage-nextcloud) this morning when I incorrectly set its URL as the remote-url for a different repo. Hillarity did not ensue. The result of that was that six different commits from the wrong repo were merged into this one.
Not a problem, I thought--too bad I can't revert those commits directly through the GitHub web site, but I'll just revert them using a client and then push back to GitHub. Seemed straightforward enough, except that now I'm left with an empty repo. Not truly empty, of course--the history is all there--but there's nothing in the master branch.
The last valid commit was on 9 Dec 20, merging a PR. How do I roll back to that state?
Not a problem, I thought--too bad I can't revert those commits directly through the GitHub web site, but I'll just revert them using a client and then push back to GitHub. Seemed straightforward enough, except that now I'm left with an empty repo. Not truly empty, of course--the history is all there--but there's nothing in the master branch.
The last valid commit was on 9 Dec 20, merging a PR. How do I roll back to that state?