当前位置: 首页 > news >正文

泉州网站建设公司招聘销售2345浏览器官网

泉州网站建设公司招聘销售,2345浏览器官网,天猫折扣店网站建设,怎么建免费企业官网站github清除在add或者commit之后缓存区 前言1. 第一步之后想要撤销2. 第二步之后想要撤销a. 改变一下rrr.txt的内容b. 想提交本地文件的test文件夹c. 我后悔了突然不想提交了 前言 github自用 一般github上代码提交顺序: 第一步: git add . or git ad…

github清除在add或者commit之后缓存区

  • 前言
  • 1. 第一步之后想要撤销
  • 2. 第二步之后想要撤销
    • a. 改变一下rrr.txt的内容
    • b. 想提交本地文件的test文件夹
    • c. 我后悔了突然不想提交了


前言

github自用

一般github上代码提交顺序:

第一步:

git add .
or
git add home/.../.../file_name
or
git add home/.../.../file_name -f

第二步:

git commit -m "test..."

第三步:

git push

1. 第一步之后想要撤销

使用git reset .命令

效果展示:

xxxxxx@server:~/xxxxxx/test_rm_cache$ git add test/1rrr.txt -f
xxxxxx@server:~/xxxxxx/test_rm_cache$ 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)new file:   test/1rrr.txtxxxxxx@server:~/xxxxxx/test_rm_cache$ git reset .
xxxxxx@server:~/xxxxxx/test_rm_cache$ git status
On branch main
Your branch is up-to-date with 'origin/main'.nothing to commit, working tree clean

2. 第二步之后想要撤销

github的内容:
在这里插入图片描述
本地文件:
在这里插入图片描述

a. 改变一下rrr.txt的内容

xxxxxx@server:~/xxxxxx/test_rm_cache$ git add .
xxxxxx@server:~/xxxxxx/test_rm_cache$ 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:   rrr.txtxxxxxx@server:~/xxxxxx/test_rm_cache$ git commit -m "test1"
[main 6e51030] test11 file changed, 1 insertion(+)xxxxxx@server:~/xxxxxx/test_rm_cache$ git push
Enumerating objects: 5, done.
Counting objects: 100% (5/5), done.
Delta compression using up to 24 threads
Compressing objects: 100% (2/2), done.
Writing objects: 100% (3/3), 244 bytes | 244.00 KiB/s, done.
Total 3 (delta 1), reused 0 (delta 0)
remote: Resolving deltas: 100% (1/1), completed with 1 local object.
To github.com:ZisongXu/test_rm_cache.git942633e..6e51030  main -> main
xxxxxx@server:~/xxxxxx/test_rm_cache$

github内容:
在这里插入图片描述
本地文件:
在这里插入图片描述

b. 想提交本地文件的test文件夹

xxxxxx@server:~/xxxxxx/test_rm_cache$ git add test/1rrr.txt -f
xxxxxx@server:~/xxxxxx/test_rm_cache$ 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)new file:   test/1rrr.txtxxxxxx@server:~/xxxxxx/test_rm_cache$ git commit -m "test2"
[main 9375ba3] test21 file changed, 2 insertions(+)create mode 100644 test/1rrr.txtxxxxxx@server:~/xxxxxx/test_rm_cache$ git status
On branch main
Your branch is ahead of 'origin/main' by 1 commit.(use "git push" to publish your local commits)nothing to commit, working tree clean
xxxxxx@server:~/xxxxxx/test_rm_cache$

c. 我后悔了突然不想提交了

xxxxxx@server:~/xxxxxx/test_rm_cache$ git reset HEAD~
xxxxxx@server:~/xxxxxx/test_rm_cache$ git reset --hard HEAD
HEAD is now at 6e51030 test1
sc19zx@server:~/apptainers/test_rm_cache$ git status
On branch main
Your branch is up-to-date with 'origin/main'.nothing to commit, working tree clean
xxxxxx@server:~/xxxxxx/test_rm_cache$ git push
Everything up-to-date
xxxxxx@server:~/xxxxxx/test_rm_cache$

github内容:
在这里插入图片描述
本地文件:
在这里插入图片描述

http://www.hkea.cn/news/169799/

相关文章:

  • 怎么做属于自己的域名网站网络策划方案
  • destoon做的网站百度商务合作联系
  • 金山区网站制作网络营销策划书1500字
  • 厦门网站建设制作工具熊猫关键词挖掘工具
  • 徐州网站建设 网站推广百度首页快速排名系统
  • 在线转格式网站怎么做拼多多seo 优化软件
  • 成都理工疫情最新消息贵港seo
  • 网站如何防止攻击怎么自己做一个小程序
  • 企业网站建设英文百度收录
  • wordpress查版本sem和seo的区别
  • 网站设计说明书怎么写网站建设平台官网
  • 有建网站的软件阿里云域名注册万网
  • 站长工具排名分析怎么创建公司网站
  • 网站建设标书四川seo哪里有
  • 接网站开发做多少钱建一个外贸独立站大约多少钱
  • wordpress表单录入seo报告
  • python做网站显示表格星巴克seo网络推广
  • 一个com的网站多少钱管理微信软件
  • 蒙阴网站建设软文代写网
  • 用python做一旅游网站南昌seo计费管理
  • 湖北省建设厅win10优化软件哪个好
  • 湖南企业建站系统平台软文有哪些发布平台
  • 南通 网络 公司网站真正免费建站
  • 做图骂人的图片网站网络服务
  • wordpress主标题副标题seo基础
  • 淮安做网站优化百度竞价排名是什么方式
  • 食品公司网站源码谷歌网页
  • 做网站用哪种代码比较好推广seo发贴软件
  • 3d效果图软件宁波seo行者seo09
  • 美国做按摩广告的网站网站优化教程