Git 状态 M,T,D,A,U

来源:互联网 发布:vscode 编译运行c 编辑:程序博客网 时间:2024/04/29 16:59

在使用git checkout , git status,或git diff files时会出现一些状态标志,M,T,D,A,R,U等等。

如:

# git status -s

A  code_iOS/UnionRich1.0/UnionRich/Png/zhifuImage/payway_icon_wechat@3x.png
A  code_iOS/UnionRich1.0/UnionRich/Png/zhifuImage/payway_icon_zhi@3x.png
M  code_iOS/UnionRich1.0/UnionRich/UnionRich_PrefixHeader.pch
UU code_iOS/UnionRich1.0/UnionRich/controllerView/other/AppDelegate.m
M  code_iOS/UnionRich1.0/UnionRich/controllerView/other/ViewController.m
M  "code_iOS/UnionRich1.0/UnionRich/controllerView/\344\270\252\344\272\272\344\277\241\346\201\257/controller/YTMessageController.m"
M  "code_iOS/UnionRich1.0/UnionRich/controllerView/\346\224\266\346\254\276/controller/CollectMoneyView.m"
M  "code_iOS/UnionRich1.0/UnionRich/controllerView/\346\224\266\346\254\276/controller/ZbarViewController.m"
M  "code_iOS/UnionRich1.0/UnionRich/\347\254\254\344\270\211\346\226\271/Self-adaption/ToolViewAndData.m"
A  "code_iOS\320UnionRich1.0/UnionRich/controllerView/other/ViewController.h"
A  "code_iOS\320UnionRich1.0/UnionRich/controllerView/other/ViewController.m"
A  "code_iOS\320UnionRich1.0/UnionRich/controllerView/other/gtmbase64+XY/NSString+ex.h"
A  "code_iOS\320UnionRich1.0/UnionRich/controllerView/other/gtmbase64+XY/NSString+ex.m"
A  "code_iOS\320UnionRich1.0/UnionRich/controllerView/other/model/UserEntity.h"
A  "code_iOS\320UnionRich1.0/UnionRich/controllerView/other/model/UserEntity.m"
A  "code_iOS\320UnionRich1.0/UnionRich/controllerView/\344\270\252\344\272\272\344\277\241\346\201\257/controller/YTMessageController.m"

A: 你本地新增的文件(服务器上没有).

C: 文件的一个新拷贝.

D: 你本地删除的文件(服务器上还在).

M: 文件的内容或者mode被修改了.

R: 文件名被修改了。

T: 文件的类型被修改了。

U: 文件没有被合并(你需要完成合并才能进行提交)。

X: 未知状态(很可能是遇到git的bug了,你可以向git提交bug report)。

在man git diff-files中可以查到这些标志的说明。

这些状态标志在git的源代码的diff.h文件中被定义。

0 0
原创粉丝点击