w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Git hard disk space problems

You need to do

git reset


git filter-branch

with correct parameters. To rewrite your history.

and then you've to push this with --force to your remote repository. Note that this will make things a bit harder for everyone that uses that repository since they will have to do a rebase or a fresh clone.

git push --force

To remove the commit from your branch. Now the commit will still be present for another 14 days or so on your remote and on the computer that contained that commit. Either you don't care or you run

git gc --prune=now

© Copyright 2018 w3hello.com Publishing Limited. All rights reserved.