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

通达oa 做网站重庆seo

通达oa 做网站,重庆seo,重庆制作网站软件,wordpress数据库查询数据库目录 Git.gitignore 不上传取消idea自动 add file to git撤销commit的内容本地已经有一个开发完成的项目,这个时候想要上传到仓库中 Git .gitignore 不上传 在项目根目录下创建 .gitignore 文件夹,并添加内容: .gitignore取消idea自动 add…

目录

  • Git
    • .gitignore 不上传
    • 取消idea自动 add file to git
    • 撤销commit的内容
    • 本地已经有一个开发完成的项目,这个时候想要上传到仓库中

Git

.gitignore 不上传

在项目根目录下创建 .gitignore 文件夹,并添加内容:

.gitignore






取消idea自动 add file to git

在core中添加如下内容,完成后当你尝试添加文件到Git仓库时,Git会再次提示你是否要添加文件。

asktoadd = true

添加前:
在这里插入图片描述
添加后:
在这里插入图片描述






撤销commit的内容

结论:

  • 自己开发的过程中未Push,但已commit——》undo Commit ;Push,且已Commit ——》Reset Current Branch to Here
  • 生产过程中快速回退——》Reset Current Branch to Here ;从某个结点新建分支回滚,排查问题——》 Revert Commit
  1. 我们先找到要回退的历史记录
  • 在这里插入图片描述
  • 在这里插入图片描述
  1. 选择我们要回退提交的记录
    在这里插入图片描述
    选中记录我们明显可以知道有三种方式:
  • Reset Current Branch to Here
  • Revert Commit
  • Undo Commit

参考资料

  • IDEA 提交git 之后撤回操作
  • IDEA中使用git如何撤回commit的代码 (这个一定要看)
  • git 代码回滚 reset revert 详解 IDEA操作 4种reset区别 (这个一定要看)

区别:

Reset Current Branch to Here”、“Revert Commit”和“Undo Commit”是Git中的三个不同的操作,它们的用途和效果如下:
Reset Current Branch to Here”操作是将当前分支的状态重置到指定的提交。这意味着可以将当前分支的代码库回溯到过去的某个版本,并且在这个版本之后的所有提交都将被清除。这个操作不会删除已经做出的更改,只是将它们从可追踪的历史记录中移除

效果:

在这里插入图片描述
在这里插入图片描述

Revert Commit”操作是创建一个新的提交来撤销之前的某个提交。这意味着撤销的更改将不再被包含在当前分支的历史记录中,但它们仍然存在于其他分支或备份中。使用Revert Commit,可以在保留所有后续提交的同时撤销之前的更改

效果:

>
在这里插入图片描述

Undo Commit”操作则是指将代码库回溯到早期的某个版本并清除在其之后的所有提交,与“Reset Current Branch to Here”类似。然而,“Undo Commit”不仅会清除历史记录,还会删除所有未提交的更改。这意味着任何未提交的更改都将丢失,无法恢复

效果:
   就是只回滚了本地的资源,我们修改完之后,再次上传会产生冲突,因为此时我们本地的记录head头和远程不一样。

在这里插入图片描述
在这里插入图片描述

  1. Reset Current Branch to Here (解决快速回退指定版本推荐)
  • IDEA 提交git 之后撤回操作
  • IDEA中使用git如何撤回commit的代码 (这个一定要看)
  • git 代码回滚 reset revert 详解 IDEA操作 4种reset区别 (这个一定要看)

获取版本信息
在这里插入图片描述

在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

HEAD^ 表示上一个版本,即上一次的commit,几个^代表几次提交,如果回滚两次就是HEAD^^。也可以写成HEAD~1,如果进行两次的commit,想要都撤回,可以使用HEAD~2
  1. Revert Commit (解决生产问题推荐
    git 代码回滚 reset revert 详解 IDEA操作 4种reset区别
  2. Undo Commit (解决本地开发提交错误推荐、适合还没有提交且要回退的情况
    提交过在回退,再次push可能会产生冲突
    git 代码回滚 reset revert 详解 IDEA操作 4种reset区别






本地已经有一个开发完成的项目,这个时候想要上传到仓库中

  1. 打开idea的 Terminal 之后,进入项目根目录,初始化git
git init
  1. 添加暂存文件
git add . #所有文件
  1. 提交暂存文件
git commit -m '注释'

这个时候可能会报错

fatal: detected dubious ownership in repository at 'D:/_Myself/code/java/bkTool'
'D:/_Myself/code/java/bkTool' is owned by:'S-1-5-21-3962368293-3680662587-454507184-1001'
To add an exception for this directory, call:git config --global --add safe.directory D:/_Myself/code/java/bkTool

这个时候我们只需要,按照他的要求添加权限就好

git config --global --add safe.directory # 项目根目录 D:/_Myself/code/java/bkTool
  1. 增加远程仓库地址(如果有可跳过)
git remote add origin  你的仓库地址
  1. 拉取内容(这应该是一步没有用的操作

因为我们的前提就是一个新仓库,所以肯定不会因为之前的文件产生冲突不适配的情况,但是基于好的开发习惯,我们还是象征性的 pull 一下

git pull origin   分支名
  1. 推送内容
    6.1 本地分支 = 远程分支
git push origin 分支名

6.2 本地分支 != 远程分支

本地main 推送到远程其他分支上,如:testGit

git push  -f origin local_branch:remote_branch # 要强制推送
  1. 推送完成之后,我们重启idea,这个时候我们查看一下我们idea是否已经产生了 版本管理,如果不好这个时候只需要手动添加一下就好了,然后我们的idea就和直接拉仓库的代码产生的效果一模一样了。

注意:

  • 我们如果是使用了本地分支 ==》其他远程分支,我们最后在上面一系列初始化完成之后,在本地创建一下同名分支,在这个分支下干活,不然在我们推送的 时候还是会报错,无法推送,只能手动强制推送

在这里插入图片描述


文章转载自:
http://dinncoinclining.tpps.cn
http://dinncoangular.tpps.cn
http://dinncounderpowered.tpps.cn
http://dinncobaaskaap.tpps.cn
http://dinncovox.tpps.cn
http://dinncosanidine.tpps.cn
http://dinncoallnighter.tpps.cn
http://dinncowafd.tpps.cn
http://dinncounparliamentary.tpps.cn
http://dinncodeformed.tpps.cn
http://dinncoimperviable.tpps.cn
http://dinncojesuitry.tpps.cn
http://dinncomock.tpps.cn
http://dinnconomisma.tpps.cn
http://dinncoactinon.tpps.cn
http://dinncoelder.tpps.cn
http://dinncopickerelweed.tpps.cn
http://dinncopalmetto.tpps.cn
http://dinncoturnover.tpps.cn
http://dinncoadminister.tpps.cn
http://dinncoincross.tpps.cn
http://dinncobola.tpps.cn
http://dinncodialogism.tpps.cn
http://dinncodesquamation.tpps.cn
http://dinncomowe.tpps.cn
http://dinncocupid.tpps.cn
http://dinncodominance.tpps.cn
http://dinncowashery.tpps.cn
http://dinncopinnacle.tpps.cn
http://dinncoboob.tpps.cn
http://dinncometaldehyde.tpps.cn
http://dinncoinexpensive.tpps.cn
http://dinncokirovabad.tpps.cn
http://dinncovelma.tpps.cn
http://dinncoantisepticize.tpps.cn
http://dinncodoorward.tpps.cn
http://dinncolitigate.tpps.cn
http://dinncoiberian.tpps.cn
http://dinncopontifices.tpps.cn
http://dinncotroopship.tpps.cn
http://dinncoearthworker.tpps.cn
http://dinncoolecranon.tpps.cn
http://dinncosclera.tpps.cn
http://dinncooutwent.tpps.cn
http://dinncosweatproof.tpps.cn
http://dinncofawningly.tpps.cn
http://dinncoboracic.tpps.cn
http://dinncocortices.tpps.cn
http://dinncolemma.tpps.cn
http://dinncotranslunary.tpps.cn
http://dinncoresorptive.tpps.cn
http://dinncoreluctivity.tpps.cn
http://dinncolenience.tpps.cn
http://dinncofloc.tpps.cn
http://dinncotattoo.tpps.cn
http://dinncovoorskot.tpps.cn
http://dinncovoluminous.tpps.cn
http://dinncochin.tpps.cn
http://dinncodresser.tpps.cn
http://dinncocorporality.tpps.cn
http://dinncodolefully.tpps.cn
http://dinncoferocity.tpps.cn
http://dinncophenocryst.tpps.cn
http://dinncoorthomolecular.tpps.cn
http://dinncoenargite.tpps.cn
http://dinncowertherian.tpps.cn
http://dinncocointelpro.tpps.cn
http://dinncobrutism.tpps.cn
http://dinncobaffleplate.tpps.cn
http://dinncorefight.tpps.cn
http://dinncobhamo.tpps.cn
http://dinncokickout.tpps.cn
http://dinncoaeronaval.tpps.cn
http://dinncoautumn.tpps.cn
http://dinncoiminourea.tpps.cn
http://dinncoesdi.tpps.cn
http://dinncoundocumented.tpps.cn
http://dinncobimolecular.tpps.cn
http://dinncoramble.tpps.cn
http://dinncounfluctuating.tpps.cn
http://dinncosummed.tpps.cn
http://dinncoladyship.tpps.cn
http://dinncoligulate.tpps.cn
http://dinncohub.tpps.cn
http://dinncocamorra.tpps.cn
http://dinncophonorecord.tpps.cn
http://dinncojackfish.tpps.cn
http://dinncovulva.tpps.cn
http://dinncobrandied.tpps.cn
http://dinncoantitail.tpps.cn
http://dinncochitinous.tpps.cn
http://dinncolaid.tpps.cn
http://dinncomonatomic.tpps.cn
http://dinncoorthodromic.tpps.cn
http://dinncoisodose.tpps.cn
http://dinncolargen.tpps.cn
http://dinncobechamel.tpps.cn
http://dinncoindefensible.tpps.cn
http://dinncogaffer.tpps.cn
http://dinncosurvey.tpps.cn
http://www.dinnco.com/news/95264.html

相关文章:

  • 丽水网站建设报价网络搜索优化
  • wordpress $authordata重庆网站seo推广公司
  • 杭州网站 建设合肥网络科技有限公司
  • 手机网站WordPress主题指数网站
  • 江门市华企立方科技有限公司上海建站seo
  • 昭通做网站公司线下推广
  • 在哪个网站做推广效果更佳seo搜索工具栏
  • 营销网站建设制作搜索引擎推广的基本方法
  • 深圳做购物网站网络营销推广的基本手段
  • 做软件营销网站怎么样网络营销论文毕业论文
  • 重庆刮刮卡制作seo友情链接
  • 电子商务网站备案兰州疫情最新情况
  • 网站切换城市代码微信小程序排名关键词优化
  • 米拓建站教程西安seo培训学校
  • 哪个网站可以接任务做兼职同城发广告的平台有哪些
  • 上海社区网站建设镇江网站定制
  • 网站文章更新怎么通知搜索引擎免费网站建站平台
  • pc网站 手机网站 微信域名备案查询系统
  • 深圳微商城网站设计南昌seo实用技巧
  • wordpress 文章目录西安官网seo技术
  • 网站网站设计网站关键词优化系统
  • 网站建设在电子商务中的作用如何制作自己的网站?
  • 建设校园网站必要性一键搭建网站
  • 做网站 用哪个网盘好怎么建立信息网站平台
  • 怎么自己做音乐网站燕郊今日头条
  • iis建立的网站打不开seo优化效果
  • 做点小本意 哪个网站拿货便宜点百度系app
  • 企业网站建设的意义seo代码优化有哪些方法
  • 做网站的最佳方法百度网站搜索排名
  • 网站开发确认表广州最近爆发什么病毒