Skip to content

Instantly share code, notes, and snippets.

@lshapz
Last active May 16, 2018 16:31
Show Gist options
  • Save lshapz/25fb7cea31488d7b36b57ef17f5c8120 to your computer and use it in GitHub Desktop.
Save lshapz/25fb7cea31488d7b36b57ef17f5c8120 to your computer and use it in GitHub Desktop.
git commands I want to remember

remove file or folder from entire git history

  • useful for sensitive data (passwords) or large files (save space)
git filter-branch --tree-filter "rm -rf ./PATH_TO_FOLDER/OR_FILE.EXT" HEAD 
git push origin --force --all
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment