I have just noticed that my computer name and personal email were used as alias and email instead of my GitHub username and email.
Is there a way to completely remove ALL commits as well as all the history from GitHub?
I have just noticed that my computer name and personal email were used as alias and email instead of my GitHub username and email.
Is there a way to completely remove ALL commits as well as all the history from GitHub?
Yes, there is! See below.
However, in this case you might also be interested to just replace your name and email address on all the commits: https://help.github.com/articles/changing-author-info/
From how to delete all commit history in github? and Make the current commit the only (initial) commit in a Git repository?
It depends on if you want to remove all configuration as well. If that's not an issue:
rm -rf .git
git init
git add .
git commit -m "Initial commit"
git remote add origin <github-uri>
git push -u --force origin master
You can save your .git/config
before, then restore it after.
Alternatively, leave the code in its current state but remove everything before (by making a new branch the new 'master' branch)
git checkout --orphan latest_branch
git add -A
git commit -am "commit message"
git branch -D master
git branch -m master
git push -f origin master