为什么要多一个暂存区
你正在改的地方 挑好了,等着记下来 记下了,随时能回来 改完直接提交不就行了,为什么中间还要有暂存区这一层?【0】
这个改动走到哪一步了
你正在改的地方 挑好了,等着记下来 记下了,随时能回来 改完 calc.py 之后,直接敲了 git status --short: $ git status --short M calc.py ?? notes.txt
add 之后又走到哪一步
你正在改的地方 挑好了,等着记下来 记下了,随时能回来 接着敲了 git add calc.py,再看一次: $ git add calc.py $ git status --short M calc.py ?? notes.txt
“working tree clean”是什么意思
敲 git status,看到: On branch main nothing to commit, working tree clean 这说明【0】。
“Untracked files”是什么意思
新建了 calc.py 之后: On branch main Untracked files: (use "git add ..." to include in what will be committed) ca
“Changes not staged for commit”是什么意思
改了 calc.py、又新建了 notes.txt 之后: On branch main Changes not staged for commit: (use "git add ..." to update wha
“Changes to be committed”是什么意思
敲了 git add calc.py 之后: On branch main Changes to be committed: (use "git restore --staged ..." to unstage)
--short 的两列各管什么
git status --short 每行前面有两个字符位: M calc.py ?? notes.txt 这两列分别是【0】。
这次提交会记进去几个文件
现在的状态是: $ git status On branch main Changes to be committed: (use "git restore --staged <file>..." to
哪个文件 Git 完全没管过
现在的状态是: $ git status On branch main Changes not staged for commit: (use "git add <file>..." to update