Skip to content
Search

Git:FilterBranch

lastmod 2020-01-09created 2020-01-091 edits

Remove a big file

git filter-branch --tree-filter 'rm path/to/your/bigfile' HEAD
git push origin master --force

If you need to delete a whole folder, add the -rf option to rm as below.

git filter-branch --tree-filter 'rm -rf path/to/your/folder' HEAD
git push origin master --force

Revert commit

See Git:Revert for details.

See also

author Zer0 sitemap