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<br> project = `r | cut -d ',' -f 1`<br> repo = `r | cut -d ',' -f 2`<br> git clone --verbose --bare https://olduser@oldgit/scm/$project/$repo.git<br> git push --mirror https://newuser@newgit/scm/$project/$repo.git<br>done < input.txt
CCM
It looks like you're new here. Sign in or register to get started.