修改之後的:Changes not staged for commit更改沒有被進階保存的 紅色字體的還沒add
與add之後的區別就是一個紅色一個l綠色的
$ git status
On branch master
Your branch is ahead of 'origin/master' by 1 commit.
(use "git push" to publish your local commits)
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: "PHP/PHP\345\255\227\347\254\246\344\270\262\345\207\275\346\225\260/24.strtr.php"
add之後的:Changes to be committed更改需要被提交 藍色字體是add之後的
$ git add .
$ git status
On branch master
Your branch is ahead of 'origin/master' by 1 commit.
(use "git push" to publish your local commits)
Changes to be committed:
(use "git restore --staged <file>..." to unstage)
modified: "PHP/PHP\345\255\227\347\254\246\344\270\262\345\207\275\346\225\260/24.strtr.php"
commit之後的:備註分支與數量[master 3b9d7b1] 修改 1 file changed, 1 insertion(+)
$ git commit -m "修改"
[master 3b9d7b1] 修改
1 file changed, 1 insertion(+)
push之後的:計算數量 進行推送
$ git push origin master
Enumerating objects: 13, done.
Counting objects: 100% (13/13), done.
Delta compression using up to 8 threads
Compressing objects: 100% (10/10), done.
Writing objects: 100% (10/10), 1.05 KiB | 1.05 MiB/s, done.
Total 10 (delta 7), reused 0 (delta 0)
remote: Resolving deltas: 100% (7/7), completed with 3 local objects.
To https://github.com/7117/CodePractice
24e64a7..3b9d7b1 master -> master