Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save animer3009/fa89cbfca9bbea018a9863109fcf6d27 to your computer and use it in GitHub Desktop.
Save animer3009/fa89cbfca9bbea018a9863109fcf6d27 to your computer and use it in GitHub Desktop.
Delete GitHub wiki revisions
# 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