I am trying to make sure I don't mess up a large feature branch I have been working on. I have two remotes:
origin - with branch dev
my - a fork of origin, with my branch dev
So, workflow is to fetch origin, pull into my origin dev, branch from that, push up, and merge branches into origin dev:
# On my dev
git fetch origin
... received new stuff...
git pull origin dev
I had a feature which depended an un-merged other branch feature. So, I did this:
# On my dev
git checkout -b first-feature
git checkout -b second-feature-based-on-first-feature
From here, I've been following our normal workflow, where when origin dev is updated, we rebase our branch on that:
git checkout first-feature
git pull --rebase origin dev
git push my first-feature -f
And then I would pull that first branch under my second branch:
git checkout second-feature-based-on-first-feature
git pull --rebase my first-feature
git push my second-feature-based-on-first-feature -f
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?
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.