cherry pick - Git Maintain two branches history and be able to git push -


i have 2 branches this

o--o--a--b-c--d env1 (master), cherry-picking env2        \         x--c--d env2  

only different between these 2 branches environment settings. want maintain these 2 branches because it's quite easy me git checkout switch between environments.

now problem is, git push allows env2, rejects env1(master). how other people latest commits(mostly cherry-picked env2) env1? p.s. don't want loose history on either branches

if git push rejecting commit, there's reason! read message. chances it's because else has pushed master since last fetch. pushing state throw away else's work. need fetch changes, merge yours in, , push results.

git fetch git checkout master git merge origin/master git push origin master 

Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

javascript - jQuery .height() return 0 when visible but non-0 when hidden -