Hi,
I would like to migrate from our local Gitlab to the internal Bitbucket.
There is the "import" feature and is very helpful but I would like to do it on many projects. Is there a way to do it even by CLI or REST?
Thanks.
For the heavy git migrations we've done, we wrote scripts that given a projectname and reponame (comma delimited file) will loop through, do a full clone, then push to the new git provider. You'll need to set/variablize the user/oldgit/newgit appropriately.
Depending on the number of projects needed, we've also added a check using the API to confirm if the target project exists, and if not, create and set permissions. If there's only a handful of target projects, we manually create.
** I haven't tested the below **
while read r; do
project = `r | cut -d ',' -f 1`
repo = `r | cut -d ',' -f 2`
git clone --verbose --bare https://olduser@oldgit/scm/$project/$repo.git
git push --mirror https://newuser@newgit/scm/$project/$repo.git
done < input.txt
CCM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.