C++ ipch visual studio tracked in git.Cannot push due to large size -


i using visual studio c++ , have forked repo , during building,git tracked huge file of 101mb resides in src/.vs/v15/ipch

now problem cannot push of changes origin github's size limit 100mb.

i committed 4-5 changes after , cannot push single of them origin.

following error in bash:

remote: error :gh001:

remote: error :gh001

i tried doing :

git --rm cached <file> 

this deleted files index still have push changes.

how can deal issue?

is there way go make n commits , undo tracking of .vs code when changed it?

you can try bfg repo-cleaner in order clean local repo of big file, applies on bare repo.

for current local (non-bare) repo, can follow "removing sensitive data repository" , remove 1 specific file past commits.

git filter-branch --force --index-filter \   'git rm --cached --ignore-unmatch path-to-your-file-with-sensitive-data' \   --prune-empty --tag-name-filter cat -- --all 

but actually, should remove .vs folder itself: see "remove folder , contents git/github's history"

git filter-branch --tree-filter 'rm -rf src/.vs' --prune-empty head git for-each-ref --format="%(refname)" refs/original/ | xargs -n 1 git update-ref -d echo .vs/ >> .gitignore git add .gitignore git commit -m 'removing src/.vs git history' git gc git push origin master --force 

Comments

Popular posts from this blog

ubuntu - PHP script to find files of certain extensions in a directory, returns populated array when run in browser, but empty array when run from terminal -

php - How can i create a user dashboard -

javascript - How to detect toggling of the fullscreen-toolbar in jQuery Mobile? -