美文网首页
6.Git 实战系列:场景:丢弃当前修改,重新检出

6.Git 实战系列:场景:丢弃当前修改,重新检出

作者: torres2019 | 来源:发表于2019-03-13 15:30 被阅读0次

场景:git checkout -f的使用场景

wangxiaodeMacBook-Pro:playgit wangxiao$ git checkout -f --help

usage: git checkout [<options>] <branch>

   or: git checkout [] [] -- ...

    -q, --quiet          suppress progress reporting

    -b           create and checkout a new branch

    -B           create/reset and checkout a branch

    -l                    create reflog for new branch

    --detach              detach HEAD at named commit

    -t, --track          set upstream info for new branch

    --orphan

                          new unparented branch

    -2, --ours            checkout our version for unmerged files

    -3, --theirs          checkout their version for unmerged files

    -f, --force          force checkout (throw away local modifications)

    -m, --merge          perform a 3-way merge with the new branch

    --overwrite-ignore    update ignored files (default)

    --conflict     conflict style (merge or diff3)

    -p, --patch          select hunks interactively

    --ignore-skip-worktree-bits

                          do not limit pathspecs to sparse entries only

    --ignore-other-worktrees

                          do not check if another worktree is holding the given ref

    --recurse-submodules[=]

                          control recursive updating of submodules

    --progress            force progress reporting

相关文章

网友评论

      本文标题:6.Git 实战系列:场景:丢弃当前修改,重新检出

      本文链接:https://www.haomeiwen.com/subject/nhctmqtx.html