Note that there are some explanatory texts on larger screens.

plurals
  1. POGit: Merging changes after branching before a revert
    primarykey
    data
    text
    <p>I've gotten myself into quite a tangle.</p> <p>I committed a restructuring change that significantly reduced functionality to <code>master</code>. (I recognise that this was a mistake.)</p> <p>This started to cause problems, because it was unfeasible to use the program with that change applied, but I had already committed further, unrelated improvements to <code>master</code>.</p> <p>So, I reverted the restructuring change on <code>master</code>, and started a new branch (say <code>restructure</code>) based off the commit <em>before</em> the revert.</p> <p>The problem now is that further valuable commits have since been made to <code>master</code> that I would like to pull in to <code>restructure</code> to ease its development. But <code>git merge</code> tries to apply the revert of the initial restructuring — oops!</p> <p>I'm not sure what to do now, and I feel like a bad decision now could vastly complicate the merge back in to <code>master</code> later on.</p> <p>To complicate things further, the <code>restructure</code> branch has been pushed. However, I don't mind having to use <code>git push --force</code> if it'll clear up all this mess; only a few people have pulled the repository since.</p> <p>I accept that the true solution to this may fail to be an answer to the question asked — this definitely feels like an <a href="https://meta.stackexchange.com/questions/66377/what-is-the-xy-problem">XY Problem</a> scenario — but I had to put <em>something</em> in the title :)</p> <p><strong>Note:</strong> I realise all this is symptomatic of a bad git workflow, and this is certainly incentive enough for me to do things more properly in the future. However, I can't retroactively not have done the wrong thing, so my problem remains :)</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload