git杂记

来源:互联网 发布:sql 删除数据表字段 编辑:程序博客网 时间:2024/05/17 20:24

 work  <-->  index <---> repo <===>  remote

【比较】

#git diff                                   //work & index

#git diff --cached                  //index  & repo

#git diff --HEAD                     //work & index & repo

【提交/复位】

#git  commmit                      //

#git cmmmit --amend        //修复已经push

#git reset                             // affect index

#git reset HAED^                //同上

#git reset --soft HEAD^    //重置引用

#git reset --hard HEAD^   //引用,work, index

0 0
原创粉丝点击