From: Junio C Hamano Date: Mon, 13 Jul 2015 21:02:18 +0000 (-0700) Subject: Merge branch 'es/worktree-add' X-Git-Tag: v2.5.0-rc2~1 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/799767cc98b2f8e6f82d0de4bef9b5e8fcc16e97?ds=inline;hp=-c Merge branch 'es/worktree-add' Update to the "linked checkout" in 2.5.0-rc1. Instead of "checkout --to" that does not do what "checkout" normally does, move the functionality to "git worktree add". * es/worktree-add: (24 commits) Revert "checkout: retire --ignore-other-worktrees in favor of --force" checkout: retire --ignore-other-worktrees in favor of --force worktree: add: auto-vivify new branch when is omitted worktree: add: make -b/-B default to HEAD when is omitted worktree: extract basename computation to new function checkout: require worktree unconditionally checkout: retire --to option tests: worktree: retrofit "checkout --to" tests for "worktree add" worktree: add -b/-B options worktree: add --detach option worktree: add --force option worktree: introduce "add" command checkout: drop 'checkout_opts' dependency from prepare_linked_checkout checkout: make --to unconditionally verbose checkout: prepare_linked_checkout: drop now-unused 'new' argument checkout: relocate --to's "no branch specified" check checkout: fix bug with --to and relative HEAD Documentation/git-worktree: add EXAMPLES section Documentation/git-worktree: add high-level 'lock' overview Documentation/git-worktree: split technical info from general description ... --- 799767cc98b2f8e6f82d0de4bef9b5e8fcc16e97 diff --combined Documentation/git-checkout.txt index 2df6d0d4b4,efe6a026f1..63b739c550 --- a/Documentation/git-checkout.txt +++ b/Documentation/git-checkout.txt @@@ -3,7 -3,7 +3,7 @@@ git-checkout(1 NAME ---- -git-checkout - Checkout a branch or paths to the working tree +git-checkout - Switch branches or restore working tree files SYNOPSIS -------- @@@ -89,10 -89,6 +89,10 @@@ Omitting detaches HEAD at the (i.e. commit, tag or tree) to update the index for the given paths before updating the working tree. + +'git checkout' with or `--patch` is used to restore modified or +deleted paths to their original contents from the index or replace paths +with the contents from a named (most often a commit-ish). ++ The index may contain unmerged entries because of a previous failed merge. By default, if you try to check out such an entry from the index, the checkout operation will fail and nothing will be checked out. @@@ -148,7 -144,7 +148,7 @@@ explicitly give a name with '-b' in suc --no-track:: Do not set up "upstream" configuration, even if the - branch.autosetupmerge configuration variable is true. + branch.autoSetupMerge configuration variable is true. -l:: Create the new branch's reflog; see linkgit:git-branch[1] for @@@ -214,7 -210,7 +214,7 @@@ the conflicted merge in the specified p --conflict=