diff options
author | Junio C Hamano <gitster@pobox.com> | 2015-07-12 09:38:21 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2015-07-12 09:38:21 -0700 |
commit | c925fe23684455735c3bb1903803643a24a58d8f (patch) | |
tree | 300efa4a8e232730a677a9337d591d12388eebaa /Documentation | |
parent | checkout: retire --ignore-other-worktrees in favor of --force (diff) | |
download | tgif-c925fe23684455735c3bb1903803643a24a58d8f.tar.xz |
Revert "checkout: retire --ignore-other-worktrees in favor of --force"
This reverts commit 0d1a1517835a10818f2d40d8780a268dbb5e20ce.
When trying to switch to a different branch, that happens to be
checked out in another working tree, the user shouldn't have to
give up the other safety measures (like protecting the local changes
that overlap the difference between the branches) while defeating
the "no two checkouts of the same branch" safety.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation')
-rw-r--r-- | Documentation/git-checkout.txt | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/Documentation/git-checkout.txt b/Documentation/git-checkout.txt index 6c3085d72d..efe6a026f1 100644 --- a/Documentation/git-checkout.txt +++ b/Documentation/git-checkout.txt @@ -111,9 +111,6 @@ 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:: @@ -228,6 +225,12 @@ 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 |