简体   繁体   中英

migrate git repository to bitbucket

I have my code (including a lot of branches) in my Git repository on GIT server in my organization that I want to move to bitbucket. The size of the repo is more than 6 GB, so I want to use Git LFS for my large binary files. How do I migrate my repo to bitbucket? If I just take a mirrored copy, I cannot add large files to Git LFS and when I push the entire code to bitbucket, it becomes read-only because it has reached the soft and hard quota limit. If I clone the entire repository, how do I add files to git lfs and then push them to a new bitbucket repository including the branches and tags?

Create a new repo in bitbucket. Configure bitbucket to use lfs. Lfs should already be configured for lfs if you are already using. Then

cd path/to/repo
git checkout master
git remote add bitbucket bitbucketrepourl
git push bitbucket master

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM