DinisCruz / Book_Practical_AngularJS

Content for 'Practical AngularJS' book published at LeanPub
Apache License 2.0
18 stars 6 forks source link

remove manuscript and manuscript_original/images folders from repo and history #25

Closed DinisCruz closed 8 years ago

DinisCruz commented 8 years ago

at the moment this repo has 1887 objects and 44.13 MiB

image

let's see if we can make it smaller (specially now that the manuscript files are not going to be stored in this repo)

DinisCruz commented 8 years ago

webhook has been removed

image

DinisCruz commented 8 years ago

backed up repo locally and downloaded zip from GitHub (just in case :) ) image

DinisCruz commented 8 years ago

going to try git filter-branch

DinisCruz commented 8 years ago

executed git filter-branch --tree-filter "rm -rf manuscript_original" HEAD

image

image

very interesting how it worked

image

image

DinisCruz commented 8 years ago

updated GitHub with git push -f origin

image

which now doesn't have the manuscript_original folder anymore

image

DinisCruz commented 8 years ago

note trying another remove doesn't work

image

which is not bad thing (since it makes do the next remove on a clean clone from this repo)

Doing a git clone with git clone git@github.com:DinisCruz/Book_Practical_AngularJS.git

image

executing git filter-branch --tree-filter "rm -rf manuscript" HEAD

image

image

This one affected 128 commits

Here is an example of a commit that is empty now

image

DinisCruz commented 8 years ago

doing a forced push using git push -f origin

image

and now the manuscript folder doesn't exist anymore

image

DinisCruz commented 8 years ago

Ironically the new repo is not much smaller than the previous one

image

which makes sense since that manuscript folder had the files that exist in the content folder

in fact it shows the power of git file storage vs file system storage

image

image

The folder that starts with _ is the previous version

DinisCruz commented 8 years ago

humm, some of the files are still there (caused by the tag/release)

image

image

DinisCruz commented 8 years ago

ok... removing the tags (and the commits associated with it) is what did the trick

image

now we have 1229 objects with 24.68Mb and the clone process takes significantly less time :)

image

DinisCruz commented 8 years ago

Here it is cloning in Travis 1.51 secs

image