Open shanyu-sys opened 3 years ago
Tips:
If you get stuck when sudo add-apt-repository ppa:git-core/ppa
for upgrading git, export http_proxy & https_proxy, and add Defaults env_keep="https_proxy"
to then end of /etc/sudoers file.
https://askubuntu.com/questions/212132/i-cant-add-ppa-repository-behind-the-proxy
# change license
grep -rl '2018\ Analytics\ Zoo' . |xargs sed -i 's/2018\ Analytics\ Zoo/2016\ The\ BigDL/g'
Don't know why after using the above command to modify the files and add the changes, git got corrupted...
error: inflate: data stream error (incorrect header check)
fatal: packed object 2ff5e776b04dbfa74a179a928373b16489ed9009 (stored in .git/objects/pack/pack-31d0f798889e780db38b77226344f9fba369ec8a.pack) is corrupt
# change license grep -rl '2018\ Analytics\ Zoo' . |xargs sed -i 's/2018\ Analytics\ Zoo/2016\ The\ BigDL/g'
Don't know why after using the above command to modify the files and add the changes, git got corrupted...
error: inflate: data stream error (incorrect header check) fatal: packed object 2ff5e776b04dbfa74a179a928373b16489ed9009 (stored in .git/objects/pack/pack-31d0f798889e780db38b77226344f9fba369ec8a.pack) is corrupt
You might run the grep
command in root directory of analytics-zoo? If so, it could have changed .git directory.
Below steps work for me to migrate directories with git history.
Step 0: install git filter-repo
git filter-repo
(reference) is much faster (seconds) than the git-history script. Note thatgit filter-repo
requiresgit
>= 2.22.0. You could refer to here to upgrade git.To install
git filter-repo
Step 1: clone zoo
Step 2: filter directories and rename.
Filter out the paths to migrate. After this, the repo will only contain the selected paths and corresponding git history.
Rename zoo path to bigdl-2.0 pattern.
Step 3: link migrated branch with bigdl-2.0
Step 4: Change imports and licenses from zoo to bigdl