-
I'm using git filter repo to clean up some commit history of a private repo in a GitHub Organization that we want to take public. I am able to successfully remove the history locally (working from a Git Bash terminal in VScode), but it breaks the connection between my local clone and my remote origin. Pretty sure PEBKAC, but I'm marginal with Git and GitHub at best, and am running out of Google query ideas to solve this. If anyone has any ideas, I'd love to hear them |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments
-
I have progressed my error. My git config file is getting wiped during the commit clean up. Taking a copy of the config file before running git filter-repo and saving the original config file back into my .git folder allows me to push again; however, my commit clean up gets merged like a feature branch rather copied over the commit history on GitHub. If anyone can give me some more ideas on how to fix this, that would be awesome. |
Beta Was this translation helpful? Give feedback.
-
I started over and did a git push --force after copying the config details back into the .git folder and making a minor edit to a readme.md, and the commit history is correct. I may have discovered a bug when using git filter-repo and the Git Bash terminal in VSCode. |
Beta Was this translation helpful? Give feedback.
-
Please read the "DISCUSSION" section of the manual (https://www.mankier.com/1/git-filter-repo#Discussion), particularly items 4, 5, and 6. The removal of the |
Beta Was this translation helpful? Give feedback.
-
Thank you. I appreciate the link and response. It's a Planning repo, rather than a code repo. I could obliterate all the commit history in it and be just fine |
Beta Was this translation helpful? Give feedback.
Please read the "DISCUSSION" section of the manual (https://www.mankier.com/1/git-filter-repo#Discussion), particularly items 4, 5, and 6. The removal of the
origin
remote is intentional to prevent likely mistakes. You can certainly add it back and push there anyway, but you really should be aware of the many pitfalls that can occur so you can avoid them; otherwise, you're at risk of ending up with a bigger mess than you started with which will be even harder to clean up.