Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Whether or not you'll have a merge "problem" depends on what happens on the upstream master prior to the owner merging in <code>branchA</code>.</p> <p>However, regardless of what happens, once <code>branchA</code> does get merged into the upstream master, you can just run the following in your local copy and be "up-to-date":</p> <pre><code>git checkout master git fetch upstream git reset --hard upstream/master </code></pre> <p>This combination will ensure your local copy of <code>master</code> points to the same commit as the upstream copy of <code>master</code>. Since you would do this <em>after</em> the owner merged <code>branchA</code> into the upstream <code>master</code>, your local <code>master</code> will, effectively, still have the changes introduced by <code>branchA</code>.</p> <p><strong>update</strong></p> <p>If you want to make changes to <code>branchA</code> prior to merging into <code>master</code>, I would recommend you create your own branch based on <code>branchA</code> and make your changes there. Having done that, you can then follow my original suggestion and, as long as you keep your local, custom branch around, you'll still have your changes available when it comes time to reset against the updated upstream <code>master</code>, and therefore be able to merge those changes into your local master after you reset it.</p> <p>As a bonus, if your changes are generally useful (i.e., not specific to your situation), you could submit a pull request to the upstream and, possibly, wind-up with your own changes merged into the upstream <code>master</code> along with <code>branchA</code>.</p>
 

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