[PATCH 6/6] doc: add stash export and import to docs
- From
brian m. carlson <sandals@crustytoothpaste.net>
- Date
- Mar 10, 2022, 17:32 UTC
- Message-ID
- <20220310173236.4165310-7-sandals@crustytoothpaste.net>
- In-Reply-To
- <20220310173236.4165310-1-sandals@crustytoothpaste.net>
Now that we have an easy way for users to import and export their stashes, let's document this in manual page so users will know how to use it.
Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net> --- Documentation/git-stash.txt | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+)
diff --git a/Documentation/git-stash.txt b/Documentation/git-stash.txt index 6e15f47525..283677314a 100644 --- a/Documentation/git-stash.txt +++ b/Documentation/git-stash.txt @@ -20,6 +20,8 @@ SYNOPSIS 'git stash' clear 'git stash' create [<message>] 'git stash' store [-m|--message <message>] [-q|--quiet] <commit> +'git stash' export ( --print | --to-ref <ref> ) [<stashes>] +'git stash' import <commit> DESCRIPTION ----------- @@ -151,6 +153,18 @@ store:: reflog. This is intended to be useful for scripts. It is probably not the command you want to use; see "push" above. +export ( --print | --to-ref <ref> ) [<stashes>]:: + + Export the specified stashes, or all of them if none are specified, to + a chain of commits which can be transferred using the normal fetch and + push mechanisms, then imported using the `import` subcommand. + +import <commit>:: + + Import the specified stashes from the specified commit, which must have been + created by `export`, and add them to the list of stashes. To replace the + existing stashes, use `clear` first. + OPTIONS ------- -a:: @@ -239,6 +253,19 @@ literally (including newlines and quotes). + Quiet, suppress feedback messages. +--print:: + This option is only valid for `export`. ++ +Create the chain of commits representing the exported stashes without +storing it anywhere in the ref namespace and print the object ID to +standard output. This is designed for scripts. + +--to-ref:: + This option is only valid for `export`. ++ +Create the chain of commits representing the exported stashes and store +it to the specified ref. + \--:: This option is only valid for `push` command. +