I have two branches. branch1
has the latest changes, the other (branch2
) contains the most recent changes that are on the remote.
So what I do is I get the most recent shared commit like so:
SHA=$(git merge-base branch1 branch2)
then I run rebase
git checkout branch1
git rebase ${SHA}
the problem I am having is that this doesn't appear to be squashing commits on branch1. Should it be squashing commits and my synopsis is wrong?
When you use rebase with the interactive option, you specify whether or not to squash a commit.
I am wondering if maybe I need to use some option like so with the rebase command
git rebase -s ${SHA}
or maybe
git rebase --autosquash ${SHA}