(base) root@...# git status
On branch main
Your branch is up to date with 'origin/main'.
Changes to be committed:
(use "git restore --staged <file>..." to unstage)
modified: README.md <-- 这个文件在暂存区
new file: new_feature.py <-- 这个新文件也在暂存区
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git restore <file>..." to discard changes in working directory)
modified: config.yaml <-- 这个文件被修改了,但未暂存
Untracked files:
(use "git add <file>..." to include in what will be committed)
temp.log <-- 这个文件是全新的,未被跟踪
2. 查看暂存区里的文件具体修改了哪些代码行
git diff --staged
以 --- 开头的行代表旧文件(来自上次提交)。
以 +++ 开头的行代表新文件(来自暂存区)。
以 - (通常是红色) 开头的行表示被删除的内容。
以 + (通常是绿色) 开头的行表示被添加的内容。
复制代码
diff --git a/README.md b/README.md
index 3b18e51..5a13240 100644
--- a/README.md
+++ b/README.md
@@ -1,3 +1,4 @@
# RK_series Project
This is a project for RK series development.
-Initial version.
+
+Version 1.1, with new features.