-q, --quiet | Quiet, suppress feedback messages |
--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 attached to a terminal, regardless of --quiet |
--no-progress | Disable progress status reporting |
-f, --force | When switching branches, proceed even if the index or the working tree differs from HEAD. This is used to throw away local changes |
-2, --ours | When checking out paths from the index, check out stage #2 (ours) for unmerged paths |
-3, --theirs | When checking out paths from the index, check out stage #3 (theirs) for unmerged paths |
-b <New Branch> | Create a new branch named <new_branch> and start it at <start_point>; see git-branch[1] for details |
-B <New Branch> | Creates the branch <new_branch> and start it at <start_point>; if it already exists, then reset it to <start_point>. This is equivalent to running 'git branch' with '-f'; see git-branch[1] for details |
-t, --track | When creating a new branch, set up 'upstream' configuration |
--no-track | Do not set up 'upstream' configuration, even if the branch.autoSetupMerge configuration variable is true |
--guess | If <branch> is not found but there does exist a tracking branch in exactly one remote (call it <remote>) with a matching name, treat as equivalent to $ git checkout -b <branch> --track <remote>/<branch> |
--no-guess | Disable --guess |
-l | Create the new branch’s reflog; see git-branch[1] for details |
-d, --detach | Rather than checking out a branch to work on it, check out a commit for inspection and discardable experiments. This is the default behavior of git checkout <commit> when <commit> is not a branch name |
--orphan <New Branch> | Create a new orphan branch, named <new_branch>, started from <start_point> and switch to it |
--ignore-skip-worktree-bits | In sparse checkout mode, git checkout -- <paths> would update only entries matched by <paths> and sparse patterns in $GIT_DIR/info/sparse-checkout. This option ignores the sparse patterns and adds back any files in <paths> |
-m, --merge | When switching branches, if you have local modifications to one or more files that are different between the current branch and the branch to which you are switching, the command refuses to switch branches in order to preserve your modifications in context |
--conflict [arg] | The same as --merge option above, but changes the way the conflicting hunks are presented, overriding the merge.conflictStyle configuration variable. Possible values are 'merge' (default) and 'diff3' (in addition to what is shown by 'merge' style, shows the original contents) |
-p, --patch | Interactively select hunks in the difference between the <tree-ish> (or the index, if unspecified) and the working tree |
--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 |
--overwrite-ignore | Silently overwrite ignored files when switching branches. This is the default behavior |
--no-overwrite-ignore | Use --no-overwrite-ignore to abort the operation when the new branch contains ignored files |
--recurse-submodules | Using --recurse-submodules will update the content of all active submodules according to the commit recorded in the superproject. If local modifications in a submodule would be overwritten the checkout will fail unless -f is used. If nothing (or --no-recurse-submodules) is used, submodules working trees will not be updated. Just like git-submodule[1], this will detach HEAD of the submodule |
--no-recurse-submodules | Submodules working trees will not be updated |
--overlay | In the default overlay mode, git checkout never removes files from the index or the working tree |
--no-overlay | When specifying --no-overlay, files that appear in the index and working tree, but not in <tree-ish> are removed, to make them match <tree-ish> exactly |
--pathspec-from-file <file> | Pathspec is passed in <file> instead of commandline args |
--pathspec-file-nul | Only meaningful with --pathspec-from-file |