- -Q
- --still
Quiet, suppress feedback.
- --Progress
- --no progress
Progress status is reported in the standard error stream by default when connected to a terminal, unless
--still
Specified. This flag allows progress reporting even when not connected to a terminal, regardless of--still
.- -F
- --Strength
Proceed when switching branches even if index or working tree is different
KOPF
, and even if untracked files are in the path. This is used to discard local changes and any untracked files or directories that are in the path.When checking out index paths, don't fail unmerged entries; instead, unmerged entries are ignored.
- --our
- -- that
When checking index paths, check level 2 (our) Or 3 (whether) for unmerged paths.
Note that during
Git-RebaseName
Egit pull --rebase
,ourEwhethermay appear inverted;--our
Specifies the branch version on which changes are rebased while-- that
specifies the version of the branch that contains your work to be rebased.It is because
fuchs
used in a workflow that treats the history on the remote side as the shared canonical history and the work done on the branch you are rebasing as the third-party work to be integrated and you temporarily assume the canonical history manager role in the Remake. As a canonical history keeper, you need to view remote control historyour
(i.e. "our shared canonical history"), while what you did in your side branch aswhether
(i.e. "the work of a contributor at the top").- -b <new branch>
Create a new branch with the name
<new-branch>
and start it on<starting point>
; vergit-branch[1]for details.- -B <new branch>
Create the branch
<new-branch>
and start it on<starting point>
;if it already exists, reset it to<starting point>
. This is equivalent to running git branch with -f; to seegit-branch[1]for details.- -T
- --track[=(direct|inherit)]
Set the "upstream" setting when creating a new branch. See "--track" ingit-branch[1]for details.
If not
-B
If the option is specified, the name of the new branch is derived from the remote tracking branch by looking at the local part of the refspec configured for the corresponding remote and then stripping the leading part down to the use of "*"cut
as a local branch at the junction ofOrigin/Hack
(orRemote Controls/Origin/Hack
, or alsorefs/remotes/origin/hack
). If the first name does not have a slash or the above guess results in an empty name, the guess is cancelled. With you can explicitly assign a name-B
in that case.- --no trace
Do not configure an "upstream" configuration, even if the
branch.autoSetupMerge
The configuration variable is true.- --saying
- - no idea
Se
<Zweig>
not found, but there is a trace branch on exactly one remote (name it<remote control>
) with the corresponding name as equivalent$ git checkout -b <Zweig> --track <Remote>/<Zweig>
If the branch exists on multiple remotes and one of them is named by
checkout.defaultRemoto
configuration variable, we'll use this for disambiguation purposes, even though the<Zweig>
it is not the same on all remotes. Put for examplecheckout.defaultRemote=Ursprung
Always check the remote branches from there when<Zweig>
is ambiguous, but exists in theOriginRemote Control. See toocheckout.defaultRemoto
Emgit-config[1].--saying
is the default behavior. To use- no idea
to disable it.The default behavior can be set via
check-out.palpite
configuration variable.- -eu
Create the new branch's reflog; to seegit-branch[1]for details.
- -D
- -- disassociate
Instead of checking out a branch to work on it, check out a commit to inspect it and discard experiments. This is the default behavior of
git checkout <commit>
Se<compromise>
it is not a branch name. See HEAD REMOVAL section below for details.- --orphan <new-branch>
create a neworphanbranch, named
<new-branch>
, started in<starting point>
and switch to it. The first commit made on this new branch will have no parent, and will be the root of a new history completely separate from all other branches and commits.The index and working tree are adjusted as if you had previously run
git checkout <start point>
. This allows you to start a new journey that will record a series of similar paths.<starting point>
walking lightlygit commit -a
to do the root commit.This can be useful if you want to publish a commit tree without exposing its full history. You might want to do this to release an open source branch of a project whose current tree is "clean" but whose full history contains proprietary or otherwise overloaded bits of code.
If you want to start a separate history that records a completely different set of paths than that of
<starting point>
, you must delete the index and working tree right after creating the orphaned branch by running itgit rm -rf .
from the top level of the working tree. After that, you're ready to prepare your new files, repopulate the working tree, copy them from elsewhere, extract a tarball, etc.- --ignore-skip-worktree-bits
Im Sparse-Checkout-Modus
git checkout -- <paths>
would only update the entries that match<paths>
and sparse patterns$GIT_DIR/info/sparse-checkout
. This option ignores sparse patterns and adds all files back<paths>
.- -M
- --merge
When switching branches, if you have made local changes to one or more files that differ between the current branch and the branch you are switching to, the command refuses to switch branches to preserve your changes in context. With this option, however, a three-way merge between the current branch, the contents of your working tree, and the new branch is complete and you are on the new branch.
If a merge conflict occurs, the index entries for conflicting paths will not be merged and you must resolve the conflicts and mark the resolved paths with
add git
(orgit rm
if the merge results in the path being excluded).When checking out index paths, this option allows you to recreate the conflicting merge on the specified paths.
When switching branches with
--merge
, staggered changes may be lost.- --conflict=<Yet>
The same as
--merge
Option above, but changes how conflicting blocks are presented and replaces themmerge.conflictStyle
configuration variable. Possible values are merge (default), diff3, and zdiff3.- -P
- - Correction
Select chunks interactively on the difference between the
<tree>
(or the index if not specified) and the working tree. The selected snippets are then applied in reverse in the working tree (and if a<tree>
specified, the index).This means you can use
git checkout -p
to selectively discard changes from your current working tree. See the Interactive Mode section ofgit-add[1]to learn to use it- Correction
Way.Note that this option defaults to non-overlapping mode (see also
- Overlay
) and currently does not support overlay mode.- --ignore-other-work-trees
git check-out
denied if the desired reference has already been taken from another working tree. With this option, the refout is still checked. In other words, the reference can be maintained by more than one working tree.- --overwrite-ignore
- --no-overwrite-ignore
Silently replace skipped files when switching branches. This is the default behavior. To use
--no-overwrite-ignore
to abort if the new branch contains skipped files.- --recurse-submodules
- --no-recurse-submodules
To use
--recurse-submodules
updates the content of all active submodules according to the commit recorded in the superproject. If local changes in a submodule are overwritten, checkout will fail-F
it is used. If nothing (or--no-recurse-submodules
) is used, submodules working trees are not updatedgit-submodule[1], this will solveKOPF
des Submoduls.- - Overlay
- --no overlapping
In default overlay mode
git check-out
never removes files from the index or framework. when specified--no overlapping
, files that appear in the index and working tree, but not in the<tree>
removed to make them match<tree>
Exactly.- --pathspec-from-file=<Data>
Pathspec is passed
<file>
instead of command line arguments. if<file>
it's needed-
then standard input is used. Path specification elements are separated by LF or CR/LF. Pathspec elements can be quoted as explained for the configuration variablecore.quotePath
(vergit-config[1]). See too--pathspec-file-null
global--literal-pathspecs
.- --pathspec-file-null
Useful only with
--pathspec-from-file
. Pathspec elements are separated by NUL characters, and all other characters are interpreted literally (including newlines and double quotes).- <Zweig>
Skip to Checkout; if it refers to a branch (that is, a name which, when preceded by "refs/heads/" is a valid reference), then that branch is checked. Otherwise, if it refers to a valid commit, your
KOPF
becomes "disconnected" and you are no longer on a branch (see below for details).You can use the...
@{-N}
Syntax for referring to the nth last branch/commit checked out with the "git checkout" operation. You can also specify-
What's up with that@{-1}
.As a special case, you can use
A...B
as a thermal base abbreviation ofA
EB
if there is exactly one merge base. You can omit at most one of them.A
EB
, in which case the default isKOPF
.- <new-branch>
Name of the new branch.
- <starting point>
The name of a commit on which to start the new branch; to seegit-branch[1]for details. The default is
KOPF
.As a special case, you can use
"A...B"
as a thermal base abbreviation ofA
EB
if there is exactly one merge base. You can omit at most one of them.A
EB
, in which case the default isKOPF
.- <tree>
Tree to check (if paths are specified). If not specified, the index is used.
As a special case, you can use
"A...B"
as a thermal base abbreviation ofA
EB
if there is exactly one merge base. You can omit at most one of them.A
EB
, in which case the default isKOPF
.- --
Do not interpret additional arguments as options.
- <path specification>…
Restricts the paths affected by the operation.
For more details seepathspecProhibitedgitglossary[7].
Git - Documentation of git-checkout (2023)
Top Articles
Your Boyfriend Game (Free Download, Unlocked Visual Horror)
John Wick Tattoos: All the Hidden Meanings Behind the Ink
Are Aries men back? (After a pause, no contact) - Vekke Sind
3 Powerful Ways to Make Your Ex Miss You Without Contact
The 13 easiest countries to emigrate to in 2023 - WOW Travel
How to convert MP4 to HEVC in Windows 11/10
CCNA 2 Examen Final Opción B - CCNA desde Cero
Latest Posts
11 Ways to Make an Aries Man Regret Losing You
50 Quotes From God's Plan So You Can Trust Him
51 Incredible Bible Verses about God's Plan — Bible Lyfe
Mad World of Donnie Darko
Donnie Darko is one of the most complicated movies ever made. We explain here.
Article information
Author: Trent Wehner
Last Updated: 03/18/2023
Views: 6380
Rating: 4.6 / 5 (56 voted)
Reviews: 87% of readers found this page helpful
Author information
Name: Trent Wehner
Birthday: 1993-03-14
Address: 872 Kevin Squares, New Codyville, AK 01785-0416
Phone: +18698800304764
Job: Senior Farming Developer
Hobby: Paintball, Calligraphy, Hunting, Flying disc, Lapidary, Rafting, Inline skating
Introduction: My name is Trent Wehner, I am a talented, brainy, zealous, light, funny, gleaming, attractive person who loves writing and wants to share my knowledge and understanding with you.