Created
March 17, 2015 02:01
-
-
Save hacksalot/72517b9b1c145116e89e to your computer and use it in GitHub Desktop.
Delete GitHub wiki revisions
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Delete prior revisions from a GitHub wiki so that only the most-recent | |
# version of the content is available. | |
# Clone the wiki. | |
git clone https://github.com/[user]/[repo].wiki.git | |
# Remove the .git folder. | |
rm -rf .git | |
# Reconstruct the local repo with only latest content | |
git init | |
git add . | |
git commit -m "Initial commit" | |
# Push to GitHub | |
git remote add origin <github-uri> | |
git push -u --force origin master | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I also had problems pushing using:
git push -u --force origin maste
rI seems you need a personal access token to login on the command line
https://docs.github.com/en/github/authenticating-to-github/keeping-your-account-and-data-secure/creating-a-personal-access-token