Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Remove a file from git repository
- This will rewrite the complete history and remove a file from history. This is useful if you have a repository and added files you want to remove for reasons like accidential credentials or too large files (github now supports up to 100MB).
- Use following command in your bash
- git filter-branch --index-filter 'git rm -r --cached --ignore-unmatch path/file' -f
- # Find a file manually
- When you search the commit where a file was added or removed you can use git log to search the history.
- git log --full-history --summary -- path/file
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement