英文:
What do the letters M, A, and D mean after git checkout
问题
我的控制台看起来像这样。
切换到分支 'main'
您的分支与 'origin/main' 保持一致。
user@dyn-128-59-6-239 proj % git branch new_branch
user@dyn-128-59-6-239 proj % git checkout new_branch
M file1.json
A file2.yml
M file3.yml
D file4.yml
切换到分支 'new_branch'
在文件列表的左侧,字母 M、A 和 D 代表什么意思?
我原本期望所有文件在新分支上与 main 分支相同。这是否意味着 main 分支和新分支之间出现了某种差异?
英文:
My console looks like this.
Switched to branch 'main'
Your branch is up to date with 'origin/main'.
user@dyn-128-59-6-239 proj % git branch new_branch
user@dyn-128-59-6-239 proj % git checkout new_branch
M file1.json
A file2.yml
M file3.yml
D file4.yml
Switched to branch 'new_branch'
What do the letters M, A, and D mean to the left of the files listed?
I was expecting all the files would be identical to main on a fresh branch. Does this mean there are differences between main and the new branch for some reason?
答案1
得分: 2
以下是翻译好的内容:
这一切都有文档记录 man git status
。实际含义取决于字母是在第一列还是第二列,但通常它们表示与当前索引的更改:
- M - 文件已修改
- A - 新文件已添加
- D - 文件已删除
英文:
It is all documented man git status
. The actual meaning depends whether the letter is in the first column or the second, but in general those indicate the changes against the current index:
-
M - file is modified
-
A - new file added
-
D - file is deleted
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论