I'm migrating a repo from BitBucket to GitHub with this script:
git clone --mirror git@bitbucket.org:my-username/my-project.git my-project
cd my-project
git remote remove origin
hub create --private my-username/my-project
git remote add origin git@github.com:my-username/my-project.git
git branch --set-upstream-to origin/master
git push --all --follow-tags
Note: hub is a CLI by GitHub
The last command from script above gave me this error:
Enumerating objects: 74049, done.
Counting objects: 100% (74049/74049), done.
Delta compression using up to 4 threads
Compressing objects: 100% (16940/16940), done.
Writing objects: 100% (74049/74049), 191.91 MiB | 2.22 MiB/s, done.
Total 74049 (delta 56351), reused 74047 (delta 56351)
remote: Resolving deltas: 100% (56351/56351), done.
remote: warning: File dsf_calculations_28th_july.csv is 69.58 MB; this is larger than GitHub's recommended maximum file size of 50.00 MB
remote: warning: File dsf_calculations_28th_july.csv is 66.19 MB; this is larger than GitHub's recommended maximum file size of 50.00 MB
remote: warning: File latest.dump.2 is 52.05 MB; this is larger than GitHub's recommended maximum file size of 50.00 MB
remote: error: GH001: Large files detected. You may want to try Git Large File Storage - https://git-lfs.github.com.
remote: error: Trace: 466e8ca5e957b77cb35f49d1a94a040b
remote: error: See http://git.io/iEPt8g for more information.
remote: error: File test_18490 is 417.38 MB; this exceeds GitHub's file size limit of 100.00 MB
When I cd
into the cloned repository in my local machine, I couldn't find the test_18490 file. I think this file was pushed to BitBucket long time ago in an old Git commit and I don't know the commit hash.
Questions
- How to find that test_18490 file in my-project and delete it?
- If I delete the test_18490 file, will it change/delete the commit too?
- Will the file deletion rewrite all commit hashes between the commit that has the test_18490 file and the last commit in the repository?