---
title: "Discussion on \"How to remove .env file from git history?\" | Hashnode"
description: "Discussion on \"How to remove .env file from git history?\". Pushed env file or secret file to github?? This blog tells how to remove it."
url: "https://hashnode.com/posts/how-to-remove-env-file-from-git-history/65ad398c000063c3f8dfa742"
---

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

Discussion

# [How to remove .env file from git history?](https://blog.priyanshudev.tech/how-to-remove-env-file-from-git-history?utm_source=hashnode&utm_medium=feed)

Pushed env file or secret file to github?? This blog tells how to remove it.

Jan 21, 2024 · 2 min read · blog.priyanshudev.tech  
Read the article

-   [#remove-git-history](https://hashnode.com/tag/remove-git-history)
-   [#remove-env-from-git-history](https://hashnode.com/tag/remove-env-from-git-history)

## Written by

[Priyanshu Agrawal](https://hashnode.com/@PriyanshuAgrawal)

@PriyanshuAgrawal · Ranchi, Jharkhand, India

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

A techie, working as a full stack developer, always learning new things and sharing with you gyus!!

I am a Techie, working as full stack developer, always learning new things and documenting and sharing it in the process.

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
