Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Migrate only selected commits from gitlab repo to bitbucket repo

SJ Office I'm New Here Jul 07, 2021


I have a doubt regarding migrating only a couple of commits from gitlab to bitbucket.

I have already migrated the entire project repo from gitlab to bitbucket.

But later a colleague of mine added some commits in gitlab which now needs to be moved to bitbucket.

How do I migrate only selected commits from gitlab to bitbucket ?



1 answer

0 votes
Caroline R Atlassian Team Jul 08, 2021

Hi, @SJ Office! Welcome to the community! 

It’s not possible to migrate only selected commits from GitLab to Bitbucket. However, you can give this user access to the repository on Bitbucket, this way they can commit the changes to the new repository. So, this is what I would suggest:

  • Give this user access to the repository on Bitbucket;

  • Ask them to change the remote URL on their local repository by running the following command:

git remote set-url origin {new URL here}
  • Ask them to run the following command to make sure they have set the correct remote repository: 
git remote -v
  • Ask them to check out those commits to a brand new branch and only push that branch to the remote repository; 

  • Then, they can use a Pull Request to merge the changes into the main branch on the Bitbucket repository; 

  • This will assure that they do not introduce conflicts and do not do a force push that could potentially cause damage to the new data on Bitbucket. 

I hope this helps, but do let me know if you have any questions. 

Kind regards,

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted in Bitbucket

How do you use the Bitbucket-Jira integration? How does it help your team?

Hey everyone, over the past year, we've added several new features on how you can use Bitbucket and Jira together. We'd love to know how you'll are using the integration and how it's helping your t...

173 views 0 2
Join discussion

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you