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

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

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

usage: git checkout []

   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 实战系列:场景:丢弃当前修改,重新检出)