Skip to content

fmacedoo/git-sensitive-data-removing

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

git-sensitive-data-removing

A simple bash script to remove git files history which contains sensitive data like secrets, keys, passwords. Once you got here, you've failed on it like me. 😂

Index

Requirements

  • You must have git client installed.
  • Windows users:
    • GitBash installed together with your git client.
  • Unix based users:
    • Just run it at your terminal.

Pre-run

  • Copy the script to the repository folder you want to get the script working.
  • Grant execute permission (only for Unix)
$ chmod +x ./filter-repo

Run

Run the script

$ ./filter-repo <files-collection-path>

The files collection file format

Each line must provide a relative file path followed by the secrets which must be replaced, split by an empty space.

Format

<file-name> [secrets]

Example

conf/appsettings.json mysupersecuresecret
conf/config.js mysupersecuresecret anothersupersecuresecret

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published