Note that there are some explanatory texts on larger screens.

plurals
  1. POGit branching from another branch
    text
    copied!<p>I am trying to make sure I don't mess up a large feature branch I have been working on. I have two remotes:</p> <pre><code>origin - with branch dev my - a fork of origin, with my branch dev </code></pre> <p>So, workflow is to fetch origin, pull into my origin dev, branch from that, push up, and merge branches into origin dev:</p> <pre><code># On my dev git fetch origin ... received new stuff... git pull origin dev </code></pre> <p>I had a feature which depended an un-merged other branch feature. So, I did this:</p> <pre><code># On my dev git checkout -b first-feature git checkout -b second-feature-based-on-first-feature </code></pre> <p>From here, I've been following our normal workflow, where when origin dev is updated, we rebase our branch on that:</p> <pre><code>git checkout first-feature git pull --rebase origin dev git push my first-feature -f </code></pre> <p>And then I would pull that first branch under my second branch:</p> <pre><code>git checkout second-feature-based-on-first-feature git pull --rebase my first-feature git push my second-feature-based-on-first-feature -f </code></pre> <p>Today first-feature was merged into origin dev. I expected second-feature's pull request on github, which showed two commits (first-feature and second-feature), to basically just now show second-feature. But it doesn't. I rebased second-feature on origin dev, and while everything seems okay, I am worried about this. Do I just force push second-feature up?</p> <p>I know this is a bit specific. I suppose my question is: how should this work, and where have I gone wrong (if I have)? I tried to follow other answers to basing a branch off a branch, but this is such unfamiliar territory, I don't want to make a huge mistake.</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