I my project I have Master and Branch1. I branched out from Branch1 and created Branch2. Both Branch1 and Branch2 moved forward with commits, Branch1 was remote and Branch2 was local to me. Once all features of Branch1 were complete, all the commits were squashed. After I was done with my changes, I committed my changes to Branch2 and rebased on top of Branch1 by using :
# On branch2
git add . && git commit "my branch"
# On branch1
git pull (to get latest changes and update local copy)
# On branch2
git rebase origin/Branch1
# fixed conflicts (1 file)
git rebase --continue
git push origin Branch2
However when I then go into github.com to create a pull request for my branch (Branch2), it shows 2 commits:
The squashed commit of Branch1
My commit ("my branch" commit message).
I dont understand this behavior. Why does commit of Branch1 show up as a commit on my branch? Is there a way to remove it, i.e have only my commit in my branch?