Win Merging two branches
#1
Hello

I'm not very familiar with git and i like to know is it possible to merge two Kodi branches?

I'm experimenting with two Kodi setups. The branch with the Blu-Ray java support und the DSPlayer with madVR support.
The Blu-Ray java player use the DVDPlayer in Kodi and madVR use DSPlayer.

So i'm wondering is it possible to merge these two branches in one source with git?
Reply
#2
yes merging branches is the bread and butter of git.

git help merge.
Reply
#3
It's certainly possible but there could be merge conflicts that you have to handle on your own
basic steps that I would use(I make no claim it's the easiest way, just one way)
git clone https://github.com/xbmc/xbmc kodi
cd kodi
git remote add https://github.com/username/xbmc bluray
git remote add https://github.com/username/xbmc madvr
git fetch --all
git checkout -b mybranch
git merge bluray/branchname
git merge madvr/branchname

hold your thumbs everything went ok
The janitor, cleaner of cruft, defender of style. Also known as the unfunny guy that doesn't understand signatures.
Reply
#4
Thank you. I tried with TortoiseGIT but couldn't get it to work. I will try it with your method. Maybe i have luck.
Reply
#5
Maybe someone can help me out. I tried to merge 2 branches and i select the madVR branch as my master. So i cloned locally with
Code:
git clone https://github.com/aracnoz/xbmc kodi
cd kodi
This worked fine.
After that i tried to add the second branch.
Code:
git remote add bluray https://github.com/ace20022/xbmc/tree/bdj
git fetch --all
I received
Fetching origin
Fetching bluray
fatal: repository 'https://github.com/ace20022/xbmc/tree/bdj/' not found
error: Could not fetch bluray

I removed and added a different url
Code:
git remote add bluray https://github.com/ace20022/xbmc.git
git fetch --all

Now i got
Code:
Fetching origin
Fetching bluray
remote: Counting objects: 2341, done.
remote: Compressing objects: 100% (804/804), done.
remote: Total 2341 (delta 1206), reused 808 (delta 808), pack-reused 729
Receiving objects: 100% (2341/2341), 3.15 MiB | 63.00 KiB/s, done.
Resolving deltas: 100% (1404/1404), done.
From https://github.com/ace20022/xbmc
* [new branch]      Dharma     -> bluray/Dharma
* [new branch]      Eden       -> bluray/Eden
* [new branch]      Eden-ATV2-iOS5 -> bluray/Eden-ATV2-iOS5
* [new branch]      Ext_Frodo  -> bluray/Ext_Frodo
* [new branch]      add_giflib -> bluray/add_giflib
* [new branch]      add_libraw -> bluray/add_libraw
* [new branch]      bd7        -> bluray/bd7
* [new branch]      bdj        -> bluray/bdj
* [new branch]      bdj08      -> bluray/bdj08
* [new branch]      bdj_tests  -> bluray/bdj_tests
* [new branch]      c++11_win32 -> bluray/c++11_win32
* [new branch]      chapters   -> bluray/chapters
* [new branch]      check_delim -> bluray/check_delim
* [new branch]      cleanup_split -> bluray/cleanup_split
* [new branch]      dialogs_refa -> bluray/dialogs_refa
* [new branch]      ext_audio_before_pvr -> bluray/ext_audio_before_pvr
* [new branch]      ext_audio_reb -> bluray/ext_audio_reb
* [new branch]      ext_audio_unified -> bluray/ext_audio_unified
* [new branch]      ext_fin    -> bluray/ext_fin
* [new branch]      external_audio -> bluray/external_audio
* [new branch]      external_audio_0713 -> bluray/external_audio_0713
* [new branch]      external_audio_reviewed -> bluray/external_audio_reviewed
* [new branch]      external_audio_revised -> bluray/external_audio_revised
* [new branch]      gif3       -> bluray/gif3
* [new branch]      gif_pr     -> bluray/gif_pr
* [new branch]      gif_review -> bluray/gif_review
* [new branch]      giflib     -> bluray/giflib
* [new branch]      giflib_ready -> bluray/giflib_ready
* [new branch]      impaired   -> bluray/impaired
* [new branch]      libbluray06 -> bluray/libbluray06
* [new branch]      locale_parse -> bluray/locale_parse
* [new branch]      master     -> bluray/master
* [new branch]      play_gifs  -> bluray/play_gifs
* [new branch]      play_gifs_cache -> bluray/play_gifs_cache
* [new branch]      roundrobin -> bluray/roundrobin
* [new branch]      scanforassocitem -> bluray/scanforassocitem
* [new branch]      start_errors -> bluray/start_errors
* [new branch]      test       -> bluray/test

I made my own branch
Code:
git checkout -b kodimadvrbluray

But now i'm stuck. How can i merge the source https://github.com/ace20022/xbmc/tree/bdj into my master?
I don't understand the git thing. Maybe someone can give me a hint. Or is this kind of impossible to merge these
two branches?
Reply
#6
git merge bluray/bdj

you add bluray as a 'remote' repository. you want to merge the 'bdj branch from that repository into the current branch. syntax is

git merge remote/branchname

you will likely get conflicts you have to resolve. in particular project files (vs, xcode) are evil.
Reply
#7
Thank you. That did the trick. I received a lot conflicts and not in project files only. To resolve the conflicts is beyond my coding skills. The project itself is too big for me. I have to admit.
Reply

Logout Mark Read Team Forum Stats Members Help
Merging two branches0