There\'s a special place in hell for people who hardcode absolute paths and database credentials into multiple random places in web applications. Sadly, before they go to he
My solution to this problem uses rebase rather than merge
Starting with a commit tree like this:
a-b-c <-- master
\
d <-- local
\
e-f-g <-- dev
$ git rebase --onto master local dev
master
V
a-b-c-e'-f'-g' <-- dev
\
d <-- local
$ git checkout master
$ git merge dev
master
V
a-b-c-e'-f'-g' <-- dev
\
d <-- local
$ git rebase --onto master master local
master
V
a-b-c-e'-f'-g' <-- dev
\
d' <-- local
$ git branch -f dev local
master
V
a-b-c-e'-f'-g'
\
d' <-- local
^
dev