diff options
author | Elijah Newren <newren@gmail.com> | 2023-11-24 12:10:42 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2023-11-26 10:10:49 +0900 |
commit | c4611130f47242af19fbd8eca2be039742c122b1 (patch) | |
tree | 1daf5fb9bc38842159b519c4868488944742d283 /Documentation/git-replay.txt | |
parent | 22d99f012f9b33ede37c47a195bad7c12dae596b (diff) | |
download | git-c4611130f47242af19fbd8eca2be039742c122b1.tar.gz |
replay: add --contained to rebase contained branches
Let's add a `--contained` option that can be used along with
`--onto` to rebase all the branches contained in the <revision-range>
argument.
Co-authored-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation/git-replay.txt')
-rw-r--r-- | Documentation/git-replay.txt | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/Documentation/git-replay.txt b/Documentation/git-replay.txt index c4c64f955a..f6c269c62d 100644 --- a/Documentation/git-replay.txt +++ b/Documentation/git-replay.txt @@ -9,7 +9,7 @@ git-replay - EXPERIMENTAL: Replay commits on a new base, works with bare repos t SYNOPSIS -------- [verse] -(EXPERIMENTAL!) 'git replay' (--onto <newbase> | --advance <branch>) <revision-range>... +(EXPERIMENTAL!) 'git replay' ([--contained] --onto <newbase> | --advance <branch>) <revision-range>... DESCRIPTION ----------- @@ -96,6 +96,16 @@ top of the exact same new base, they only differ in that the first provides instructions to make mybranch point at the new commits and the second provides instructions to make target point at them. +What if you have a stack of branches, one depending upon another, and +you'd really like to rebase the whole set? + +------------ +$ git replay --contained --onto origin/main origin/main..tipbranch +update refs/heads/branch1 ${NEW_branch1_HASH} ${OLD_branch1_HASH} +update refs/heads/branch2 ${NEW_branch2_HASH} ${OLD_branch2_HASH} +update refs/heads/tipbranch ${NEW_tipbranch_HASH} ${OLD_tipbranch_HASH} +------------ + When calling `git replay`, one does not need to specify a range of commits to replay using the syntax `A..B`; any range expression will do: |