git-工作区-暂存区-仓库(六)

来源:互联网 发布:aspen优化 编辑:程序博客网 时间:2024/05/29 16:19

git-工作区-暂存区-仓库图解

这里写图片描述

  • A->B

    touch new.txt

  • B->C

    git add new.txt

  • C->D

    外部编辑new.txt

  • D->E

    git add new.txt

  • D->F

    git commit -m “first commit”

  • F->G

    git add new.txt



  • B->A

    rm new.txt

  • C->B

    git rm –cached new.txt

  • C->A

    git rm new.txt

  • D->C

    git checkout – new.txt

  • F->C

    git checkout HEAD new.txt

  • G->C

    git checkout HEAD new.txt

  • G->F

    git reset new.txt

0 0
原创粉丝点击