Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How to migrate a git repo from HiDrive?

rainerhilmer
Contributor
April 19, 2017

Hello,

I have some git repositories on HiDrive and I'd like to move them to BitBucket. However, the Bitbucket migration process can't cope with addresses like

UserName@git.hidrive.strato.com:users/UserName/git-Repos/Spikes.git

That's right, no protocol header.
I am able to move the repo by creating an empty one on Bitbucket, changing the URL in the git config and a simple push. However, it's a bit cumbersome when there are several repos waiting for a migration.

1 answer

0 votes
Kelly Schoenhofen
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
April 19, 2017 edited

I've just resorted to scripting (bash/cmd depending on linux/windows) in this situation; make a function that does the clone, the remote create, and then push it to bitbucket (no need to change the url in the git config). Then just feed your function a list of repos and let your script run.

Pro tip: Make sure you use --mirror, it pulls in extra attributes tha even --bare doesn't. e.g.

git clone --mirror http://oldserver/repo.git
cd repo.git
git push --mirror ssh://new-bitbucket/repo.git

Suggest an answer

Log in or Sign up to answer
TAGS
atlassian, forge, forge learning path, atlassian learning, cloud app development, forge app development, build forge apps, atlassian certification, developer training, jira app development, confluence app development, automation, ui frameworks

Turn Ideas into Atlassian Apps 📱

From setup to deployment—this learning path shows you how to build your first app using Forge. Learn the essentials, streamline workflows, and bring custom solutions to life across Jira, Confluence, and more.

Start Learning
AUG Leaders

Atlassian Community Events