Steps to follow in case you want to reset (i.e. empty) the content of a GitHub repository, without deleting the full repository itself:

 

  • in case you don't already have it, create a SSH key and add it to your GitHub profile:
    Generating a new SSH key and adding it to the ssh-agent
  • now that your session is authenticated and authorized, you can proceed with https://gist.github.com/stephenhardy/5470814:
    -- Remove the history from 
    rm -rf .git
    
    -- recreate the repos from the current content only
    git init
    git add .
    git commit -m "Initial commit"
    
    -- push to the github remote repos ensuring you overwrite history
    git remote add origin git@github.com:<YOUR ACCOUNT>/<YOUR REPOS>.git
    git push -u --force origin master‚Äč