git - How to resize the remote repository without deleting all the commit history? -
there several related question on stackoverflow (a few linked below) not solve particular problem.
i share repository co-workers have pushed huge datafiles/images increased size of remote repository 14 gb. later on, these files got deleted using rm filename
resized local repositories reasonable size. however, when check online, repository's size still 14 gb.
what tried reduce repositories size suggested here:
git reflog expire --expire=now --all git gc --aggressive --prune=now
but affected local repository's size.
the answers here did not either since files not deleted on own computer on co-workers' ones.
what have not tried yet, might work delete commit history described here . however, keep commit history , rid of garbage created rm filename
on machines not own.
is there solution (getting rid of garbage created on other local machines decrease size of remote repository) without removing commit history?
edit:
in @torek's link in comments, found command rid of commits related file. tried rid of commits images e.g. .png. used following command:
git filter-branch --tree-filter 'rm -f *.png' head
however, message:
warning: ref 'refs/heads/master' unchanged
how use correctly?
Comments
Post a Comment