Dear Bitbucket community,
I would like to copy the commit history of one repo to another. I have my main repo and I duplicated it and called it my "dev" repo to practice using git. I made some changes to the "dev" repo and would like to move those changes to the main repo. Any tips on how to do that? The manual way to do that would be to make a local clone of the "main" repo and then replace all the files and commit each change manually but it seems very time consuming. I can also replace all files at once and make one huge commit but then I would lose the commit history. How can I update the main repo with the commits I made in the dev repo?
Any help would be much appreciated.
Kind regards,
Oli
Hi Olivier, welcome to the Community!
First of all, please note that your question tilts towards how to use Git rather than how to use Bitbucket, so you might not always find answers to that kind of questions in this forum. That said I'll try to help you anyway :)
To bring changes from the second repository to the first one, you can use git pull. You'll do it from your original repository, and the command would look something like:
git pull <path-to-second-repository> <branch-where-the-changes-were-made>
If you made the changes on a remote, the path will be its URL.
You can read more about git pull in the official Git documentation.
Hope that helps!
Ana
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.