I have the following branches where A
is the current active branch:
*A C
| /
B
Often, I want to rebase C
onto A
and then merge C
into A
. So far I'm doing it with single commands:
git checkout C
git rebase A
git checkout A
git merge C
# and optional to clean up no longer needed branches
git branch -d C
git push origin :C
What would be a simple way to do this in one command? Is there a "git-way" or do I have to rely on a shell script?