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

场景: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

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。