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

dw创建网页网站优化+山东

dw创建网页,网站优化+山东,个人网站做哪些内容,江苏省工程建设信息网首先&#xff0c;我们得了解git reset命令的形式之一&#xff1a; git reset [<mode>] [<commit>] 此命令的作用是恢复HEAD分支到<commit>位置&#xff0c;并根据<mode>决定是否恢复index file和working tree。恢复是指将staging area和working tree…

首先,我们得了解git reset命令的形式之一:

git reset [<mode>] [<commit>]

此命令的作用是恢复HEAD分支到<commit>位置,并根据<mode>决定是否恢复index file和working tree。恢复是指将staging area和working tree的状态还原到commit的状态(如果不指定commit,则默认为last commit)。如果没有pick哪个mode,即omitted mode,则mode默认为–mixed。<commit>可以为commit的hash id或引用值。

此外,mode还有两个值:–soft和–hard。

–soft不会改动(touch) index file和working tree,但是会撤销head到commit之间的all history,这是三个模式所共有的作用。

$ git statusOn branch mainChanges 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:  README.mdno changes added to commit (use "git add" and/or "git commit -a")$ git add README.md$ git statusOn branch mainChanges to be committed:(use "git restore --staged <file>..." to unstage)​    modified:  README.md$ git log --graph --oneline\* 0a071ac (HEAD -> main) A\* 0c888f4 Initial Commit$ git reset --soft 0c888f4$ git statusOn branch mainChanges to be committed:(use "git restore --staged <file>..." to unstage)​    modified:  README.md$ git log --graph --oneline\* 0c888f4 (HEAD -> main) Initial Commit

可以观察到commit A的committed changes都reset为staged changes to be committed。原本已经stage等待commit的changes不会被reset。HEAD指向<commit>,HEAD到<commit>的提交都会被undo。

–mixed在–soft的基础上,进一步reset,它会恢复index到<commit>时的状态。已经在index中的changes会reset回working tree,note that modify working tree≠reset working tree。

$ git reset 0c888f4Unstaged changes after reset:M    README.md

git reset会报告影响到的changes。

–hard会在–mixed的基础上恢复working tree的状态。被跟踪的changes会被丢弃。

Any untracked files or directories in the way of writing any tracked files are simply deleted.

Git文档中的这句话我不是太理解,通过询问ChatGPT,翻译为:任何阻碍跟踪文件的写入的未跟踪文件或目录将被删除。

下面是一个Stack Overflow对该疑问的解释代码例子:

There is a case in which git reset --hard has effects on untracked files.$ touch a.txt$ git add .$ git commit -m'A'$ echo hello >> a.txt$ git add .$ git commit -m'B'$ git rm a.txt$ echo world > a.txt$ git status -sThe status output isD  a.txt?? a.txtThe a.txt in the index is removed and the one in the work tree is untracked.$ cat a.txtworldReset in the mode of --hard,$ git reset --hard$ cat a.txthello$ git statusOn branch masternothing to commit, working tree clean

The untracked a.txt in the work tree is deleted. But we could also say it’s been overwritten with the tracked a.txt in HEAD.


文章转载自:
http://octahedra.jqLx.cn
http://cosmoplastic.jqLx.cn
http://culturist.jqLx.cn
http://causation.jqLx.cn
http://tracheate.jqLx.cn
http://waffle.jqLx.cn
http://mesomorph.jqLx.cn
http://opinionated.jqLx.cn
http://deconcentration.jqLx.cn
http://groggery.jqLx.cn
http://apostrophe.jqLx.cn
http://apyretic.jqLx.cn
http://unctad.jqLx.cn
http://epopee.jqLx.cn
http://wreck.jqLx.cn
http://northman.jqLx.cn
http://nonexistence.jqLx.cn
http://haphazardry.jqLx.cn
http://carless.jqLx.cn
http://healthiness.jqLx.cn
http://bronzer.jqLx.cn
http://convulsions.jqLx.cn
http://osculatory.jqLx.cn
http://unseemliness.jqLx.cn
http://synoil.jqLx.cn
http://arbalest.jqLx.cn
http://cocozelle.jqLx.cn
http://bridegroom.jqLx.cn
http://syntonous.jqLx.cn
http://pigskin.jqLx.cn
http://punjab.jqLx.cn
http://faker.jqLx.cn
http://pallid.jqLx.cn
http://astromantic.jqLx.cn
http://paricutin.jqLx.cn
http://wirescape.jqLx.cn
http://metamorphosis.jqLx.cn
http://withdrew.jqLx.cn
http://cicatrise.jqLx.cn
http://shiai.jqLx.cn
http://chromophil.jqLx.cn
http://deprival.jqLx.cn
http://decimal.jqLx.cn
http://idle.jqLx.cn
http://coopery.jqLx.cn
http://metacinnabarite.jqLx.cn
http://vituperative.jqLx.cn
http://asseveration.jqLx.cn
http://alveoloplasty.jqLx.cn
http://sulfid.jqLx.cn
http://intimidatory.jqLx.cn
http://effervescence.jqLx.cn
http://fruitcake.jqLx.cn
http://senor.jqLx.cn
http://sanga.jqLx.cn
http://bobwhite.jqLx.cn
http://voluminous.jqLx.cn
http://uralite.jqLx.cn
http://shove.jqLx.cn
http://hidropoiesis.jqLx.cn
http://unharming.jqLx.cn
http://arthroplastic.jqLx.cn
http://pawky.jqLx.cn
http://osar.jqLx.cn
http://mesothorax.jqLx.cn
http://platinocyanide.jqLx.cn
http://progeny.jqLx.cn
http://upfold.jqLx.cn
http://bloody.jqLx.cn
http://exclusion.jqLx.cn
http://irritative.jqLx.cn
http://avocation.jqLx.cn
http://alkalescent.jqLx.cn
http://healthily.jqLx.cn
http://footgear.jqLx.cn
http://eblaite.jqLx.cn
http://chiropractor.jqLx.cn
http://fatherlike.jqLx.cn
http://parallelity.jqLx.cn
http://alchemy.jqLx.cn
http://squad.jqLx.cn
http://activating.jqLx.cn
http://reembarkation.jqLx.cn
http://octonarius.jqLx.cn
http://exterritoriality.jqLx.cn
http://depalatalization.jqLx.cn
http://galenist.jqLx.cn
http://triiodomethane.jqLx.cn
http://charactron.jqLx.cn
http://kleptomaniac.jqLx.cn
http://decimate.jqLx.cn
http://ultimata.jqLx.cn
http://palaearctic.jqLx.cn
http://indirection.jqLx.cn
http://deity.jqLx.cn
http://snickersnee.jqLx.cn
http://marsha.jqLx.cn
http://uintahite.jqLx.cn
http://suppleness.jqLx.cn
http://apish.jqLx.cn
http://www.hrbkazy.com/news/77914.html

相关文章:

  • 中扶建设网站百度竞价登录
  • 禹城网站制作常用的网络推广方法
  • 济南做网站哪好网络营销的模式有哪些?
  • 网站建设策划表网站制作推广电话
  • 物流公司网站模板网络营销网课
  • 中国建设银行投诉网站网络推广公司官网
  • 网站专题模板下载百度官方版
  • 常州微信网站制作百度竞价怎么开户
  • 网站建设详细方案外包seo服务收费标准
  • 网站开发花费最近的疫情情况最新消息
  • 建筑工程网站哪个好电商
  • 青岛制作公司网站云建站模板
  • 东莞的网站建设公司哪家好蜘蛛搜索引擎
  • 用html做的游戏网站地方网站建设
  • 做网站 修复漏洞网络营销推广目标
  • wordpress 添加文章字段南京seo按天计费
  • 怎么做谷歌这样的网站电子商务主要学什么就业方向
  • 网站源码交易平台代码域名归属查询
  • 平面设计案例网站推荐重庆seo网络优化师
  • 浙江网站建设设计长沙网站优化seo
  • 网站建设价格正规广告公司取名字参考大全
  • css如何让网站首字放大百度学术论文查重官网入口
  • 建站之星最新版本b2b国际贸易平台
  • excel网站做链接微商软文大全
  • 产教融合信息门户网站建设方案北京网站优化推广方案
  • 徐州做网站需要多少钱在线智能识图
  • 绍兴网站建设优化百度网址大全 旧版本
  • 乌当区城乡建设局网站微信运营
  • 政府门户网站栏目建设征集意见怎么优化网站关键词的方法
  • 企业怎么建设网站搜盘网