GitHub - Delete prior 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 main
GitHub - Rename main branch
git branch -m old_name new_name
git fetch origin
git branch -u origin/new_name new_name
git remote set-head origin -a
.gitignore
everything
# Ignore everything in repository root
/*
# Files to not ignore
!/.gitignore
!/some_other_files
# Folder to not ignore
!/folder_to_include/