Search code examples
githubversion-controlblamegit-blame

How to delete GitHub blame history?


I'd like to delete the GitHub blame history that GitHub shows (tracking all changes made)

I am aware of how to how to roll back changes, but I am not trying to roll back any changes I have made, I am simply trying to delete this history of the changes.

Obviously, I do own the repository that I will be operating on (and am the sole owner)


Solution

  • If this is for all files of your GitHub repository, the simplest way would be to:

    • initialize a new local repository
    • add files from the original repo
    • add as remote the original repo GitHub URL
    • force push

    That is:

    git clone https://github.com/me/myrepo
    git init myrepo2
    cd repo2
    git --work-tree=../myrepo add .
    git checkout @ -- .
    git commit -m "Import myrepo"
    git remote add origin https://github.com/me/myrepo
    git push --force -u origin master