zoukankan      html  css  js  c++  java
  • git Diff

    在git提交环节,存在三大部分:working tree, index file, commit

    这三大部分中:

    working tree:就是你所工作在的目录,每当你在代码中进行了修改,working tree的状态就改变了。
    index file:是索引文件,它是连接working tree和commit的桥梁,每当我们使用git-add命令来登记后,index file的内容就改变了,此时index file就和working tree同步了。
    commit:是最后的阶段,只有commit了,我们的代码才真正进入了git仓库。我们使用git-commit就是将index file里的内容提交到commit中。
    总结一下:
    git diff:是查看working tree与index file的差别的。
    git diff --cached:是查看index file与commit的差别的。
    git diff HEAD:是查看working tree和commit的差别的。(你一定没有忘记,HEAD代表的是最近的一次commit的信息)

  • 相关阅读:
    6 Django的视图层
    5 Django-2的路由层(URLconf)
    4 Django简介
    3 web框架
    2 http协议
    1 web应用
    15-jQuery补充
    14-jQuery的ajax
    13-轮播实现(各种)
    12-事件委托(事件代理)
  • 原文地址:https://www.cnblogs.com/leibg/p/4634027.html
Copyright © 2011-2022 走看看