Skip to content

Instantly share code, notes, and snippets.

@christophemarois
Last active March 18, 2023 19:39
Show Gist options
  • Select an option

  • Save christophemarois/9e7cad2da8d43cecc021820219126477 to your computer and use it in GitHub Desktop.

Select an option

Save christophemarois/9e7cad2da8d43cecc021820219126477 to your computer and use it in GitHub Desktop.
Remove a file from git

Remove a file from git

Accidentally committed a 4GB file and GitHub (rightly) doesn't let you push? Commited a .env with your social insurance number?

  1. Back up the entire repo
  2. Run bfg --delete-files [filenames...] (brew install bfg)
  3. Follow instructions
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment