Suggestion: git rebase -i master
Hi,
Here is a useful one that I use often to perform an interactive rebase of the feature branch I'm on (assuming in this example that it branched off master
).
The advantage here is that it avoids counting the commits!
git checkout master
git checkout -b feature-abc
# Adding commits to the feature branch
git rebase -i master
This will interactive rebase the commits on feature-abc
that are not on master
.
This is great as there is no need to count the commits to rebase!