Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <blockquote> <p>But is there a way that when I push my branch to a remote branch, the base branch is set to the remote branch I specified?</p> </blockquote> <p>That means avoiding:</p> <pre><code>x--x--x (branch1) x--x--x ==&gt; push ==&gt; \ y--y--y (origin/remote-name) y--y--y--M </code></pre> <p>But rather get:</p> <pre><code> y--y--y--x--x--x </code></pre> <p>That is only possible if, <strong>before pushing, your <code>branch1</code> has been rebased on top of <code>origin/remote_name</code></strong>:</p> <pre><code>git fetch origin git checkout branch1 git rebase origin/remote_name git push branch1:remote_name </code></pre> <hr> <blockquote> <p>Our scenario is like Master branch is the, let's say live app, every time we found a defect, we create a fix-branch (should be branched off the development branch), create our fixes and push the fix-branch to development branch first where testing and QA happens. Once finalized, push it back to master.</p> </blockquote> <p>In your case, you need to rebase and push to a different branch, one which is <em>not</em> <code>dev</code>, because <code>dev</code> represents a different development effort, one of continuous modifications, as opposed as puctual fixes.</p> <p>Create a <strong>release branch</strong> which represents the hot-fixes that you integrate one by one on top of <code>master</code> (prod).</p> <p>Each time you see a bug:</p> <ul> <li>create a branch for that <code>bug</code>,</li> <li>fix the bug</li> <li>rebase the bug branch on top of the <code>release_branch</code></li> <li>push the <code>bug</code> branch for QA to review</li> <li>once reviewed, push it to <code>master</code></li> </ul>
    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. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      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