Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,293,371
Community Members
 
Community Events
165
Community Groups

Migrate only selected commits from gitlab repo to bitbucket repo

Hello,

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 ?

Thanks.

SJ

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,
Caroline

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Bitbucket

Git push size limits are coming to Bitbucket Cloud starting April 4th, 2022

Beginning on April 4th, we will be implementing push limits. This means that your push cannot be completed if it is over 3.5 GB. If you do attempt to complete a push that is over 3.5 GB, it will fail...

2,086 views 2 9
Read article

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