also update `HEAD` to set the specified branch as the current
branch.
-'git checkout' <branch>::
+'git checkout' [<branch>]::
To prepare for working on <branch>, switch to it by updating
the index and the files in the working tree, and by pointing
HEAD at the branch. Local modifications to the files in the
--quiet::
Quiet, suppress feedback messages.
---[no-]progress::
+--progress::
+--no-progress::
Progress status is reported on the standard error stream
by default when it is attached to a terminal, unless `--quiet`
is specified. This flag enables progress reporting even if not
section of linkgit:git-add[1] to learn how to operate the `--patch` mode.
+
Note that this option uses the no overlay mode by default (see also
-`--[no-]overlay`), and currently doesn't support overlay mode.
+`--overlay`), and currently doesn't support overlay mode.
--ignore-other-worktrees::
`git checkout` refuses when the wanted ref is already checked
out anyway. In other words, the ref can be held by more than one
worktree.
---[no-]recurse-submodules::
+--overwrite-ignore::
+--no-overwrite-ignore::
+ Silently overwrite ignored files when switching branches. This
+ is the default behavior. Use `--no-overwrite-ignore` to abort
+ the operation when the new branch contains ignored files.
+
+--recurse-submodules::
+--no-recurse-submodules::
Using --recurse-submodules will update the content of all initialized
submodules according to the commit recorded in the superproject. If
local modifications in a submodule would be overwritten the checkout
Do not attempt to create a branch if a remote tracking branch
of the same name exists.
---[no-]overlay::
+--overlay::
+--no-overlay::
In the default overlay mode, `git checkout` never
removes files from the index or the working tree. When
specifying `--no-overlay`, files that appear in the index and