/usr/share/doc/git
git-replay(1) ============= NAME ---- git-replay - EXPERIMENTAL: Replay commits on a new base, works with bare repos too SYNOPSIS -------- [verse] (EXPERIMENTAL!) 'git replay' ([--contained] --onto <newbase> | --advance <branch>) <revision-range>... DESCRIPTION ----------- Takes ranges of commits and replays them onto a new location. Leaves the working tree and the index untouched, and updates no references. The output of this command is meant to be used as input to `git update-ref --stdin`, which would update the relevant branches (see the OUTPUT section below). THIS COMMAND IS EXPERIMENTAL. THE BEHAVIOR MAY CHANGE. OPTIONS ------- --onto <newbase>:: Starting point at which to create the new commits. May be any valid commit, and not just an existing branch name. + When `--onto` is specified, the update-ref command(s) in the output will update the branch(es) in the revision range to point at the new commits, similar to the way how `git rebase --update-refs` updates multiple branches in the affected range. --advance <branch>:: Starting point at which to create the new commits; must be a branch name. + When `--advance` is specified, the update-ref command(s) in the output will update the branch passed as an argument to `--advance` to point at the new commits (in other words, this mimics a cherry-pick operation). <revision-range>:: Range of commits to replay. More than one <revision-range> can be passed, but in `--advance <branch>` mode, they should have a single tip, so that it's clear where <branch> should point to. See "Specifying Ranges" in linkgit:git-rev-parse[1] and the "Commit Limiting" options below. include::rev-list-options.txt[] OUTPUT ------ When there are no conflicts, the output of this command is usable as input to `git update-ref --stdin`. It is of the form: update refs/heads/branch1 ${NEW_branch1_HASH} ${OLD_branch1_HASH} update refs/heads/branch2 ${NEW_branch2_HASH} ${OLD_branch2_HASH} update refs/heads/branch3 ${NEW_branch3_HASH} ${OLD_branch3_HASH} where the number of refs updated depends on the arguments passed and the shape of the history being replayed. When using `--advance`, the number of refs updated is always one, but for `--onto`, it can be one or more (rebasing multiple branches simultaneously is supported). EXIT STATUS ----------- For a successful, non-conflicted replay, the exit status is 0. When the replay has conflicts, the exit status is 1. If the replay is not able to complete (or start) due to some kind of error, the exit status is something other than 0 or 1. EXAMPLES -------- To simply rebase `mybranch` onto `target`: ------------ $ git replay --onto target origin/main..mybranch update refs/heads/mybranch ${NEW_mybranch_HASH} ${OLD_mybranch_HASH} ------------ To cherry-pick the commits from mybranch onto target: ------------ $ git replay --advance target origin/main..mybranch update refs/heads/target ${NEW_target_HASH} ${OLD_target_HASH} ------------ Note that the first two examples replay the exact same commits and on 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: ------------ $ git replay --onto origin/main ^base branch1 branch2 branch3 update refs/heads/branch1 ${NEW_branch1_HASH} ${OLD_branch1_HASH} update refs/heads/branch2 ${NEW_branch2_HASH} ${OLD_branch2_HASH} update refs/heads/branch3 ${NEW_branch3_HASH} ${OLD_branch3_HASH} ------------ This will simultaneously rebase `branch1`, `branch2`, and `branch3`, all commits they have since `base`, playing them on top of `origin/main`. These three branches may have commits on top of `base` that they have in common, but that does not need to be the case. GIT --- Part of the linkgit:git[1] suite
.
Edit
..
Edit
BreakingChanges.txt
Edit
CODE_OF_CONDUCT.md
Edit
DecisionMaking.html
Edit
DecisionMaking.txt
Edit
MyFirstContribution.html
Edit
MyFirstContribution.txt
Edit
MyFirstObjectWalk.html
Edit
MyFirstObjectWalk.txt
Edit
README.md
Edit
RelNotes
Edit
ReviewingGuidelines.html
Edit
ReviewingGuidelines.txt
Edit
SubmittingPatches.html
Edit
SubmittingPatches.txt
Edit
ToolsForGit.html
Edit
ToolsForGit.txt
Edit
blame-options.txt
Edit
cmds-ancillaryinterrogators.txt
Edit
cmds-ancillarymanipulators.txt
Edit
cmds-developerinterfaces.txt
Edit
cmds-foreignscminterface.txt
Edit
cmds-guide.txt
Edit
cmds-mainporcelain.txt
Edit
cmds-plumbinginterrogators.txt
Edit
cmds-plumbingmanipulators.txt
Edit
cmds-purehelpers.txt
Edit
cmds-synchelpers.txt
Edit
cmds-synchingrepositories.txt
Edit
cmds-userinterfaces.txt
Edit
config.txt
Edit
contrib
Edit
date-formats.txt
Edit
diff-format.txt
Edit
diff-generate-patch.txt
Edit
diff-options.txt
Edit
docbook-xsl.css
Edit
docinfo.html
Edit
everyday.html
Edit
fetch-options.txt
Edit
fsck-msgids.txt
Edit
git-add.html
Edit
git-add.txt
Edit
git-am.html
Edit
git-am.txt
Edit
git-annotate.html
Edit
git-annotate.txt
Edit
git-apply.html
Edit
git-apply.txt
Edit
git-archive.html
Edit
git-archive.txt
Edit
git-bisect-lk2009.html
Edit
git-bisect-lk2009.txt
Edit
git-bisect.html
Edit
git-bisect.txt
Edit
git-blame.html
Edit
git-blame.txt
Edit
git-branch.html
Edit
git-branch.txt
Edit
git-bugreport.html
Edit
git-bugreport.txt
Edit
git-bundle.html
Edit
git-bundle.txt
Edit
git-cat-file.html
Edit
git-cat-file.txt
Edit
git-check-attr.html
Edit
git-check-attr.txt
Edit
git-check-ignore.html
Edit
git-check-ignore.txt
Edit
git-check-mailmap.html
Edit
git-check-mailmap.txt
Edit
git-check-ref-format.html
Edit
git-check-ref-format.txt
Edit
git-checkout-index.html
Edit
git-checkout-index.txt
Edit
git-checkout.html
Edit
git-checkout.txt
Edit
git-cherry-pick.html
Edit
git-cherry-pick.txt
Edit
git-cherry.html
Edit
git-cherry.txt
Edit
git-clean.html
Edit
git-clean.txt
Edit
git-clone.html
Edit
git-clone.txt
Edit
git-column.html
Edit
git-column.txt
Edit
git-commit-graph.html
Edit
git-commit-graph.txt
Edit
git-commit-tree.html
Edit
git-commit-tree.txt
Edit
git-commit.html
Edit
git-commit.txt
Edit
git-config.html
Edit
git-config.txt
Edit
git-contacts.html
Edit
git-contacts.txt
Edit
git-count-objects.html
Edit
git-count-objects.txt
Edit
git-credential-cache--daemon.html
Edit
git-credential-cache--daemon.txt
Edit
git-credential-cache.html
Edit
git-credential-cache.txt
Edit
git-credential-store.html
Edit
git-credential-store.txt
Edit
git-credential.html
Edit
git-credential.txt
Edit
git-describe.html
Edit
git-describe.txt
Edit
git-diagnose.html
Edit
git-diagnose.txt
Edit
git-diff-files.html
Edit
git-diff-files.txt
Edit
git-diff-index.html
Edit
git-diff-index.txt
Edit
git-diff-tree.html
Edit
git-diff-tree.txt
Edit
git-diff.html
Edit
git-diff.txt
Edit
git-difftool.html
Edit
git-difftool.txt
Edit
git-fast-export.html
Edit
git-fast-export.txt
Edit
git-fast-import.html
Edit
git-fast-import.txt
Edit
git-fetch-pack.html
Edit
git-fetch-pack.txt
Edit
git-fetch.html
Edit
git-fetch.txt
Edit
git-filter-branch.html
Edit
git-filter-branch.txt
Edit
git-fmt-merge-msg.html
Edit
git-fmt-merge-msg.txt
Edit
git-for-each-ref.html
Edit
git-for-each-ref.txt
Edit
git-for-each-repo.html
Edit
git-for-each-repo.txt
Edit
git-format-patch.html
Edit
git-format-patch.txt
Edit
git-fsck-objects.html
Edit
git-fsck-objects.txt
Edit
git-fsck.html
Edit
git-fsck.txt
Edit
git-fsmonitor--daemon.html
Edit
git-fsmonitor--daemon.txt
Edit
git-gc.html
Edit
git-gc.txt
Edit
git-get-tar-commit-id.html
Edit
git-get-tar-commit-id.txt
Edit
git-grep.html
Edit
git-grep.txt
Edit
git-hash-object.html
Edit
git-hash-object.txt
Edit
git-help.html
Edit
git-help.txt
Edit
git-hook.html
Edit
git-hook.txt
Edit
git-http-backend.html
Edit
git-http-backend.txt
Edit
git-http-fetch.html
Edit
git-http-fetch.txt
Edit
git-http-push.html
Edit
git-http-push.txt
Edit
git-imap-send.html
Edit
git-imap-send.txt
Edit
git-index-pack.html
Edit
git-index-pack.txt
Edit
git-init-db.html
Edit
git-init-db.txt
Edit
git-init.html
Edit
git-init.txt
Edit
git-interpret-trailers.html
Edit
git-interpret-trailers.txt
Edit
git-log.html
Edit
git-log.txt
Edit
git-ls-files.html
Edit
git-ls-files.txt
Edit
git-ls-remote.html
Edit
git-ls-remote.txt
Edit
git-ls-tree.html
Edit
git-ls-tree.txt
Edit
git-mailinfo.html
Edit
git-mailinfo.txt
Edit
git-mailsplit.html
Edit
git-mailsplit.txt
Edit
git-maintenance.html
Edit
git-maintenance.txt
Edit
git-merge-base.html
Edit
git-merge-base.txt
Edit
git-merge-file.html
Edit
git-merge-file.txt
Edit
git-merge-index.html
Edit
git-merge-index.txt
Edit
git-merge-one-file.html
Edit
git-merge-one-file.txt
Edit
git-merge-tree.html
Edit
git-merge-tree.txt
Edit
git-merge.html
Edit
git-merge.txt
Edit
git-mergetool--lib.html
Edit
git-mergetool--lib.txt
Edit
git-mergetool.html
Edit
git-mergetool.txt
Edit
git-mktag.html
Edit
git-mktag.txt
Edit
git-mktree.html
Edit
git-mktree.txt
Edit
git-multi-pack-index.html
Edit
git-multi-pack-index.txt
Edit
git-mv.html
Edit
git-mv.txt
Edit
git-name-rev.html
Edit
git-name-rev.txt
Edit
git-notes.html
Edit
git-notes.txt
Edit
git-pack-objects.html
Edit
git-pack-objects.txt
Edit
git-pack-redundant.html
Edit
git-pack-redundant.txt
Edit
git-pack-refs.html
Edit
git-pack-refs.txt
Edit
git-patch-id.html
Edit
git-patch-id.txt
Edit
git-prune-packed.html
Edit
git-prune-packed.txt
Edit
git-prune.html
Edit
git-prune.txt
Edit
git-pull.html
Edit
git-pull.txt
Edit
git-push.html
Edit
git-push.txt
Edit
git-quiltimport.html
Edit
git-quiltimport.txt
Edit
git-range-diff.html
Edit
git-range-diff.txt
Edit
git-read-tree.html
Edit
git-read-tree.txt
Edit
git-rebase.html
Edit
git-rebase.txt
Edit
git-receive-pack.html
Edit
git-receive-pack.txt
Edit
git-reflog.html
Edit
git-reflog.txt
Edit
git-refs.html
Edit
git-refs.txt
Edit
git-remote-ext.html
Edit
git-remote-ext.txt
Edit
git-remote-fd.html
Edit
git-remote-fd.txt
Edit
git-remote-helpers.html
Edit
git-remote.html
Edit
git-remote.txt
Edit
git-repack.html
Edit
git-repack.txt
Edit
git-replace.html
Edit
git-replace.txt
Edit
git-replay.html
Edit
git-replay.txt
Edit
git-request-pull.html
Edit
git-request-pull.txt
Edit
git-rerere.html
Edit
git-rerere.txt
Edit
git-reset.html
Edit
git-reset.txt
Edit
git-restore.html
Edit
git-restore.txt
Edit
git-rev-list.html
Edit
git-rev-list.txt
Edit
git-rev-parse.html
Edit
git-rev-parse.txt
Edit
git-revert.html
Edit
git-revert.txt
Edit
git-rm.html
Edit
git-rm.txt
Edit
git-send-pack.html
Edit
git-send-pack.txt
Edit
git-sh-i18n--envsubst.html
Edit
git-sh-i18n--envsubst.txt
Edit
git-sh-i18n.html
Edit
git-sh-i18n.txt
Edit
git-sh-setup.html
Edit
git-sh-setup.txt
Edit
git-shell.html
Edit
git-shell.txt
Edit
git-shortlog.html
Edit
git-shortlog.txt
Edit
git-show-branch.html
Edit
git-show-branch.txt
Edit
git-show-index.html
Edit
git-show-index.txt
Edit
git-show-ref.html
Edit
git-show-ref.txt
Edit
git-show.html
Edit
git-show.txt
Edit
git-sparse-checkout.html
Edit
git-sparse-checkout.txt
Edit
git-stage.html
Edit
git-stage.txt
Edit
git-stash.html
Edit
git-stash.txt
Edit
git-status.html
Edit
git-status.txt
Edit
git-stripspace.html
Edit
git-stripspace.txt
Edit
git-submodule.html
Edit
git-submodule.txt
Edit
git-switch.html
Edit
git-switch.txt
Edit
git-symbolic-ref.html
Edit
git-symbolic-ref.txt
Edit
git-tag.html
Edit
git-tag.txt
Edit
git-tools.html
Edit
git-tools.txt
Edit
git-unpack-file.html
Edit
git-unpack-file.txt
Edit
git-unpack-objects.html
Edit
git-unpack-objects.txt
Edit
git-update-index.html
Edit
git-update-index.txt
Edit
git-update-ref.html
Edit
git-update-ref.txt
Edit
git-update-server-info.html
Edit
git-update-server-info.txt
Edit
git-upload-archive.html
Edit
git-upload-archive.txt
Edit
git-upload-pack.html
Edit
git-upload-pack.txt
Edit
git-var.html
Edit
git-var.txt
Edit
git-verify-commit.html
Edit
git-verify-commit.txt
Edit
git-verify-pack.html
Edit
git-verify-pack.txt
Edit
git-verify-tag.html
Edit
git-verify-tag.txt
Edit
git-version.html
Edit
git-version.txt
Edit
git-web--browse.html
Edit
git-web--browse.txt
Edit
git-whatchanged.html
Edit
git-whatchanged.txt
Edit
git-worktree.html
Edit
git-worktree.txt
Edit
git-write-tree.html
Edit
git-write-tree.txt
Edit
git.html
Edit
git.txt
Edit
gitattributes.html
Edit
gitattributes.txt
Edit
gitcli.html
Edit
gitcli.txt
Edit
gitcore-tutorial.html
Edit
gitcore-tutorial.txt
Edit
gitcredentials.html
Edit
gitcredentials.txt
Edit
gitdiffcore.html
Edit
gitdiffcore.txt
Edit
giteveryday.html
Edit
giteveryday.txt
Edit
gitfaq.html
Edit
gitfaq.txt
Edit
gitformat-bundle.html
Edit
gitformat-bundle.txt
Edit
gitformat-chunk.html
Edit
gitformat-chunk.txt
Edit
gitformat-commit-graph.html
Edit
gitformat-commit-graph.txt
Edit
gitformat-index.html
Edit
gitformat-index.txt
Edit
gitformat-pack.html
Edit
gitformat-pack.txt
Edit
gitformat-signature.html
Edit
gitformat-signature.txt
Edit
gitglossary.html
Edit
gitglossary.txt
Edit
githooks.html
Edit
githooks.txt
Edit
gitignore.html
Edit
gitignore.txt
Edit
gitmailmap.html
Edit
gitmailmap.txt
Edit
gitmodules.html
Edit
gitmodules.txt
Edit
gitnamespaces.html
Edit
gitnamespaces.txt
Edit
gitpacking.html
Edit
gitpacking.txt
Edit
gitprotocol-capabilities.html
Edit
gitprotocol-capabilities.txt
Edit
gitprotocol-common.html
Edit
gitprotocol-common.txt
Edit
gitprotocol-http.html
Edit
gitprotocol-http.txt
Edit
gitprotocol-pack.html
Edit
gitprotocol-pack.txt
Edit
gitprotocol-v2.html
Edit
gitprotocol-v2.txt
Edit
gitremote-helpers.html
Edit
gitremote-helpers.txt
Edit
gitrepository-layout.html
Edit
gitrepository-layout.txt
Edit
gitrevisions.html
Edit
gitrevisions.txt
Edit
gitsubmodules.html
Edit
gitsubmodules.txt
Edit
gittutorial-2.html
Edit
gittutorial-2.txt
Edit
gittutorial.html
Edit
gittutorial.txt
Edit
gitworkflows.html
Edit
gitworkflows.txt
Edit
glossary-content.txt
Edit
howto
Edit
howto-index.html
Edit
howto-index.txt
Edit
i18n.txt
Edit
line-range-format.txt
Edit
line-range-options.txt
Edit
merge-options.txt
Edit
merge-strategies.txt
Edit
mergetools-diff.txt
Edit
mergetools-merge.txt
Edit
object-format-disclaimer.txt
Edit
pretty-formats.txt
Edit
pretty-options.txt
Edit
pull-fetch-param.txt
Edit
ref-reachability-filters.txt
Edit
ref-storage-format.txt
Edit
rerere-options.txt
Edit
rev-list-description.txt
Edit
rev-list-options.txt
Edit
revisions.txt
Edit
scalar.html
Edit
scalar.txt
Edit
sequencer.txt
Edit
signoff-option.txt
Edit
technical
Edit
trace2-target-values.txt
Edit
transfer-data-leaks.txt
Edit
urls-remotes.txt
Edit
urls.txt
Edit
user-manual.html
Edit
user-manual.txt
Edit