mirror of
https://github.com/git/git
synced 2024-08-25 02:35:46 +00:00
![Elijah Newren](/assets/img/avatar_default.png)
We want this command to be a minimal command that just does server side picking of commits, displaying the results on stdout for higher level scripts to consume. So let's simplify it: * remove the worktree and index reading/writing, * remove the ref (and reflog) updating, * remove the assumptions tying us to HEAD, since (a) this is not a rebase and (b) we want to be able to pick commits in a bare repo, i.e. to/from branches that are not checked out and not the main branch, * remove unneeded includes, * handle rebasing multiple branches by printing on stdout the update ref commands that should be performed. The output can be piped into `git update-ref --stdin` for the ref updates to happen. In the future to make it easier for users to use this command directly maybe an option can be added to automatically pipe its output into `git update-ref`. 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>
43 lines
1.1 KiB
Plaintext
43 lines
1.1 KiB
Plaintext
git-replay(1)
|
|
=============
|
|
|
|
NAME
|
|
----
|
|
git-replay - EXPERIMENTAL: Replay commits on a new base, works with bare repos too
|
|
|
|
|
|
SYNOPSIS
|
|
--------
|
|
[verse]
|
|
(EXPERIMENTAL!) 'git replay' --onto <newbase> <oldbase> <branch>
|
|
|
|
DESCRIPTION
|
|
-----------
|
|
|
|
Takes a range of commits, specified by <oldbase> and <branch>, and
|
|
replays them onto a new location (see `--onto` option below). 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.
|
|
|
|
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.
|
|
|
|
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.
|
|
|
|
GIT
|
|
---
|
|
Part of the linkgit:git[1] suite
|