---
title: "Discussion on \"How to delete all commit history in GitHub?\" | Hashnode"
description: "Discussion on \"How to delete all commit history in GitHub?\". If you ever pushed your credentials into GitHub and you had many commits after that incident then it would be a big problem removing the credentials from the history. So one of the options would be to delete the whole commit history. In this tutorial..."
url: "https://hashnode.com/posts/how-to-delete-all-commit-history-in-github/611e612be404793819ca52f7"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [How to delete all commit history in GitHub?](https://blog.avneesh.tech/how-to-delete-all-commit-history-in-github?utm_source=hashnode&utm_medium=feed)

If you ever pushed your credentials into GitHub and you had many commits after that incident then it would be a big problem removing the credentials from the history. So one of the options would be to delete the whole commit history. In this tutorial...

Aug 19, 2021 · 1 min read · blog.avneesh.tech  
Updated Sep 3, 2021  
Read the article

-   [#github](https://hashnode.com/tag/github)
-   [#git](https://hashnode.com/tag/git)
-   [#command-line](https://hashnode.com/tag/command-line)
-   [#2articles1week](https://hashnode.com/tag/2articles1week)
-   [#hashnode](https://hashnode.com/tag/hashnode)

## Written by

[Avneesh Agarwal](https://hashnode.com/@avneesh0612)

@avneesh0612

  
[View profile](https://hashnode.com/@avneesh0612)

Fullstack web3 developer

16 yo full stack web3 developer building cool shit and teaching others

## Responses 2

Markdown supported · ⌘↵ to post

[Güven Göç](https://hashnode.com/@guv2000)

[Apr 11, 2023](https://hashnode.com/posts/how-to-delete-all-commit-history-in-github/611e612be404793819ca52f7/comment/643575b4fefbae6a6f563398)

Thank you for this useful article.

[Nishanth Dipali](https://hashnode.com/@lorsten)

[Aug 20, 2021](https://hashnode.com/posts/how-to-delete-all-commit-history-in-github/611e612be404793819ca52f7/comment/611f12daa5d08237f40dd94b)

Appreciate your hard work and consistency keep going.

We can use this if we have leaked our credentials by mistake

[Avneesh Agarwal](https://hashnode.com/@avneesh0612)

[Aug 20, 2021](https://hashnode.com/posts/how-to-delete-all-commit-history-in-github/611e612be404793819ca52f7/comment/611f12daa5d08237f40dd94b#reply-611f5759e404793819ca69a0)

Thanks! Exactly, we all have pushed the credentials at least once 😂
