Can we use rebase to squash multiple commits into one single commit on the same branch?
Taking an example, i have created two topic branches - issueA_1 and issueA_2 from
In your case,
git checkout issueA_2
git rebase -i master
or
git rebase -i commitX1^ #parent of commitX1 in branch issueA_2
should also work. In this case, you don't need to count (I'm usually one off).
Yes, the simplest way I find is to do:
git rebase -i HEAD~3
This will let you review the last 3 commits and you can then squash them.