![]() The index and the working tree are adjusted as if you had previously run "git checkout ". The first commit made on this new branch will have no parents and it will be the root of a new history totally disconnected from all the other branches and commits. orphan Create a new orphan branch, named, started from and switch to it. l Create the new branch(cqs reflog see git-branch(1) for details. no-track Do not set up "upstream" configuration, even if the tosetupmerge configuration variable is true. You can explicitly give a name with -b in such a case. If the given name has no slash, or the above guessing results in an empty name, the guessing is aborted. This would tell us to use "hack" as the local branch when branching off of "origin/hack" (or "remotes/origin/hack", or even "refs/remotes/origin/hack"). If "remotes/" or "refs/remotes/" is prefixed it is stripped away, and then the part up to the next slash (which would be the nickname of the remote) is removed. If no -b option is given, the name of the new branch will be derived from the remote branch. See "-track" in git-branch(1) for details. t, -track When creating a new branch, set up "upstream" configuration. b Create a new branch named and start it at see git-branch(1) for details. ours, -theirs When checking out paths from the index, check out stage #2 ( ours) or #3 ( theirs) for unmerged paths. When checking out paths from the index, do not fail upon unmerged entries instead, unmerged entries are ignored. This is used to throw away local changes. f, -force When switching branches, proceed even if the index or the working tree differs from HEAD. q, -quiet Quiet, suppress feedback messages. With -m, changes made to the working tree file can be discarded to re-create the original conflicted merge result. The contents from a specific side of the merge can be checked out of the index by using -ours or -theirs. Using -f will ignore these unmerged entries. By default, if you try to check out such an entry from the index, the checkout operation will fail and nothing will be checked out. ![]() ![]() The index may contain unmerged entries because of a previous failed merge. commit, tag or tree) to update the index for the given paths before updating the working tree. The argument can be used to specify a specific tree-ish (i.e. In this case, the -b and -track options are meaningless and giving either of them results in an error. It updates the named paths in the working tree from the index file or from a named (most often a commit). When or -patch are given, git checkout not switch branches. As a convenience, -track without -b implies branch creation see the description of -track below. If -b is given, a new branch is created as if git-branch(1) were called and then checked out in this case you can use the -track or -no-track options, which will be passed to git branch. Git checkout, git checkout -b This form switches branches by updating the index, working tree, and HEAD to reflect the specified branch. If no paths are given, git checkout will also update HEAD to set the specified branch as the current branch. Updates files in the working tree to match the version in the index or the specified tree.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |