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

河南建筑材料信息网seo技术大师

河南建筑材料信息网,seo技术大师,广东建设职业技术学院官方网站,网站怎么做微信送红包活动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/16166/

相关文章:

  • 怎么让网站绑定域名访问不了搜索引擎营销的原理是什么
  • 济南网站惠州百度seo找谁
  • 自助餐火锅网站建设企业推广哪个平台好
  • b s网站系统如何做性能测试站外推广怎么做
  • wordpress搭建视频教程深圳最好的外贸seo培训
  • 游戏发卡中心网站源码抖音seo运营模式
  • 三里屯做网站的公司软件开发工资一般多少
  • 郑州做网站第一人湖北最新消息
  • 织梦网站地图怎么做sitemap.xml怎样制作网站
  • 可靠的合肥网站建设搜索推广
  • 网页源码怎么做网站整站seo服务
  • 做视频素材哪个网站好电商热门关键词
  • 电商建站价格南宁求介绍seo软件
  • 长沙网站制作的公司网站制作教程
  • 商品展示型网站有哪些网站运营怎么做
  • asp做的网站青岛网站制作
  • php网站开发所需要的软件口碑营销怎么做
  • 网站开发 科技百度推广助手app下载
  • 给政府做网站能赚多少钱一个平台怎么推广
  • 爱藏网一家专业做收藏品网站网络营销具有哪些特点
  • 住房和城乡建设局网站九幺seo优化神器
  • 怎么切图做网站深圳网络推广服务公司
  • 用ps做美食网站网上推广产品哪个网好
  • 游民星空是用什么做的网站杭州百度代理公司
  • 有什么做海报的网站吗seo关键词使用
  • 用服务器建立网站电商营销的策略与方法
  • 图片 展示 网站模板郑州企业网站优化排名
  • 营销型网站定做石家庄网站建设培训
  • php动态网站开发答案百度账号注册申请
  • dede 网站地图 插件网站怎样做推广