diff options
author | Eric Sunshine <sunshine@sunshineco.com> | 2015-07-06 13:31:00 -0400 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2015-07-07 14:34:46 -0700 |
commit | 0d1a1517835a10818f2d40d8780a268dbb5e20ce (patch) | |
tree | 34fc59b1e3f82790f86d684513c1ba356fbed390 /Documentation/git-checkout.txt | |
parent | worktree: add: auto-vivify new branch when <branch> is omitted (diff) | |
download | tgif-0d1a1517835a10818f2d40d8780a268dbb5e20ce.tar.xz |
checkout: retire --ignore-other-worktrees in favor of --force
As a safeguard, checking out a branch already checked out by a different
worktree is disallowed. This behavior can be overridden with
--ignore-other-worktrees, however, this option is neither obvious nor
particularly discoverable. As a common safeguard override, --force is
more likely to come to mind. Therefore, overload it to also suppress the
check for a branch already checked out elsewhere.
Signed-off-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation/git-checkout.txt')
-rw-r--r-- | Documentation/git-checkout.txt | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/Documentation/git-checkout.txt b/Documentation/git-checkout.txt index efe6a026f1..6c3085d72d 100644 --- a/Documentation/git-checkout.txt +++ b/Documentation/git-checkout.txt @@ -111,6 +111,9 @@ OPTIONS + When checking out paths from the index, do not fail upon unmerged entries; instead, unmerged entries are ignored. ++ +By default, checking out a branch already checked out in another worktree +is disallowed. This overrides that safeguard. --ours:: --theirs:: @@ -225,12 +228,6 @@ This means that you can use `git checkout -p` to selectively discard edits from your current working tree. See the ``Interactive Mode'' section of linkgit:git-add[1] to learn how to operate the `--patch` mode. ---ignore-other-worktrees:: - `git checkout` refuses when the wanted ref is already checked - out by another worktree. This option makes it check the ref - out anyway. In other words, the ref can be held by more than one - worktree. - <branch>:: Branch to checkout; if it refers to a branch (i.e., a name that, when prepended with "refs/heads/", is a valid ref), then that |