[PATCH v2 2/2] Documentation/git-pull.txt: teach 'git pull --rebase' the --[no-]autostash option.
- From
Mehul Jain <mehul.jain2029@gmail.com>
- Date
- Feb 27, 2016, 17:41 UTC
- Message-ID
- <1456594902-21182-2-git-send-email-mehul.jain2029@gmail.com>
- In-Reply-To
- <1456594902-21182-1-git-send-email-mehul.jain2029@gmail.com>
git pull --rebase understands --[no-]autostash flag.
This flag overrides config variable "rebase.autoStash" if set (default is false).
When calling "git pull --rebase" with "--autostash", pull passes the "--autostash" option to rebase, which then runs rebase on a dirty worktree.
With "--no-autostash" option, the command will die if the worktree is dirty, before calling rebase. Signed-off-by: Mehul Jain <mehul.jain2029@gmail.com> --- Documentation/git-pull.txt | 16 ++++++++++++++++ 1 file changed, 16 insertions(+)
diff --git a/Documentation/git-pull.txt b/Documentation/git-pull.txt index a62a2a6..ce22c52 100644 --- a/Documentation/git-pull.txt +++ b/Documentation/git-pull.txt @@ -128,6 +128,22 @@ unless you have read linkgit:git-rebase[1] carefully. --no-rebase:: Override earlier --rebase. +--autostash:: + Automatically create a temporary stash before the operation + begins, and apply it after the operation ends. This means + that you can run rebase on a dirty worktree. ++ +This option is only valid when '--rebase' option is used. ++ +[NOTE] +Use with care: the final stash application after a successful +rebase might result in non-trivial conflicts. + +--no-autostash:: + If the '--autostash' option is enabled by default using the + configuration variable `rebase.autoStash`, this option can be + used to override this setting. + Options related to fetching ~~~~~~~~~~~~~~~~~~~~~~~~~~~
-- 2.7.1.340.g69eb491.dirty