'Git interactive rebase: how to move other branches (refs) automatically?
Sometimes I would like to do a rebase and make sure other refs are updated to the new structure without manual resets or multiple rebases.
Is there a way to do it in one go, so that git rebase would update refs to new commit that are picked and had references before rebase?
One example:
Situation before Rebase:
* abc3... commit3 (branch:a, HEAD)
* abc2... commit2
* abc1... commit1 (branch:b)
* abc0... base commmit (branch:master)
Then do a Rebase master -i: pick abc3, abc1, abc2
And the result will look like: (branch:b stays in its own branch of commit)
* abc6... commit2 (branch:a, HEAD)
* abc5... commit1
* abc4... commit3
|
| * abc1... commit1 (branch:b)
|/
* abc0... base commmit (branch:master)
What I would like the result to look like: (branch:b is updated to a new commit)
* abc6... commit2 (branch:a, HEAD)
* abc5... commit1 (branch:b)
* abc4... commit3
* abc0... base commmit (branch:master)
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
