The repo I'm working on does not use master
as the bleeding edge, they use a develop
branch. master
is used to follow the latest release. Thus, master
should always be behind develop
.
I did not realize this workflow, and pushed a documentation fix (involving things like README files) to master
. As a simple example, our site used to be on Sourceforge, and I updated the readme to talk about GitHub instead.
Because I then realized I was on the wrong branch, I reverted things. In GitHub land, the way to do this is with another merge request that basically reverts your first commit.
My master
branch currently shows Sourceforge-related wording in my READMEs. My develop
branch currently shows GitHub-related wording. But the develop
branch is 16 commits behind master
.
Using GitHub's "merge" function shows me a diff that would revert my docs, just like the master
branch was reverted.
So far, the only fix I've found is to manually merge the 16 commits, but de-conflict them by manually discarding all the changes. Obviously the commits that update the docs already happened in develop, because the words are correct.
Using either git rebase master
or git merge master
in the develop branch blows away my changes. I need, effectively, a "db-only" merge.