2017年11月15日 星期三

Git, remote: error: inflate: data stream error (incorrect data check)

1. Find a local repository that cloned from a corrupted repository
2. To create a new repository in remote side

git init --bare <new repo>

3. The best thing I can think of would be to pull a local copy, change the origin to the new server, and then push:

git pull --all
git remote rm origin
git remote add origin <new repo address>
git push --all --repo=origin


4. Run "git fsck --full" at remote side. Tar and remove bad_repo if everything is ok. Finally, rename new_repo to bad_repo.

git fsck --full
tar -zcvf bad_repo.tar.gz bad_repo
rm -rf bad_repo
mv new_repo bad_repo

Refer to:
  https://stackoverflow.com/questions/11565882/how-to-move-git-repositories-from-github-to-local-server-running-gitolite/37254780


沒有留言:

張貼留言