Git的四种状态

修改之后的: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

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值