Can anyone help me with this,
My Folder structure is like this :
Repo1 [Repository]
|- branch1 [branch]
Repo2 [Repository]
|-branch1 [branch]
Now I need to merge file difference changes from Repo1/branch1
to Repo2/branch1
How do I do that. I am using git [bitbucket] as source control. For GUI I am using sourcetree
Thanks,
krutik
It's actually pretty easy if both "repos" are forks of the same repository. If they are truly different repositories completely, the merge gets a little messy, but is certainly possible.
The basic steps:
cd Repo2/branch1
git remote add Repo1 ../Repo1/branch1/.git
git fetch Repo1
git merge Repo1/branch1 --allow-unrelated-histories
That should trigger a regular "git merge" scenario. Even if both repos are actually 100% separate, Git will still do the merge, but won't be able to auto merge any differences between files.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With