summaryrefslogtreecommitdiff
path: root/Documentation/git-switch.txt
diff options
context:
space:
mode:
Diffstat (limited to 'Documentation/git-switch.txt')
-rw-r--r--Documentation/git-switch.txt18
1 files changed, 15 insertions, 3 deletions
diff --git a/Documentation/git-switch.txt b/Documentation/git-switch.txt
index bbcbdce..f38e4c8 100644
--- a/Documentation/git-switch.txt
+++ b/Documentation/git-switch.txt
@@ -59,13 +59,18 @@ out at most one of `A` and `B`, in which case it defaults to `HEAD`.
-c <new-branch>::
--create <new-branch>::
Create a new branch named `<new-branch>` starting at
- `<start-point>` before switching to the branch. This is a
- convenient shortcut for:
+ `<start-point>` before switching to the branch. This is the
+ transactional equivalent of
+
------------
$ git branch <new-branch>
$ git switch <new-branch>
------------
++
+that is to say, the branch is not reset/created unless "git switch" is
+successful (e.g., when the branch is in use in another worktree, not
+just the current branch stays the same, but the branch is not reset to
+the start-point, either).
-C <new-branch>::
--force-create <new-branch>::
@@ -171,7 +176,7 @@ name, the guessing is aborted. You can explicitly give a name with
`branch.autoSetupMerge` configuration variable is true.
--orphan <new-branch>::
- Create a new 'orphan' branch, named `<new-branch>`. All
+ Create a new unborn branch, named `<new-branch>`. All
tracked files are removed.
--ignore-other-worktrees::
@@ -265,6 +270,13 @@ always create a new name for it (without switching away):
$ git switch -c good-surprises
------------
+CONFIGURATION
+-------------
+
+include::includes/cmd-config-section-all.txt[]
+
+include::config/checkout.txt[]
+
SEE ALSO
--------
linkgit:git-checkout[1],