"Multichannel" development using git -


i'm developing app windows phone, using sdk version 7.1 (for wp7) , hosting in git repo. in order make available on windows phone 8 devices higher resolutions, created branch wp8 converted visual studio project , made necessary code adjustments.

now continue developing on master, update functionality-related changes wp8 branch. first thought merge branches, fear 2 possible problems:

  1. when using merge, 1 branch disappear. (not true)
  2. firmware-related changes (wp7 → wp8) might overridden.

is there proper way in git develop several different (but similar) target sdks depend on big amount of identical code?

when using merge, 1 branch disappear.

no, no branch disappear

firmware-related changes (wp7wp8) might overridden

first, try rather rebase wp8 on top of master.
is, try apply wp8 on top of master (see merge vs. rebase).
gary fixler comments below, makes sense branches short history (otherwise, re-applying old commits on top of recent work can troublesome, , history wouldn't make sense).


i bring rebase, because considered bad practice merge master other branch (this called "back merge", , makes adam dymitruk angry;)).

you should use feature branches, can merge master, and wp8 branch.
takes advantage of ease of branching offered git, , leave master stable state of code: further evolution master should done in feature branch (and merged to master), instead of being done in master (resulting in "back merge" master branch, bad practice)

see more on adam's article "branch per feature".


regarding configuration files, can store values in separates files, , use template file build right config file right values, depending on branch are.
see "what's easiest way deal project configuration files?".

that way, want have merge issue files different content in different branches, because values stored in different files.


Comments

Popular posts from this blog

Perl - how to grep a block of text from a file -

delphi - How to remove all the grips on a coolbar if I have several coolbands? -

javascript - Animating array of divs; only the final element is modified -