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

网站备案喷绘关键词优化app

网站备案喷绘,关键词优化app,wordpress主题:yusi,网站制作公司电话文章目录 一、安装并配置Git二、Git的基本操作三、Github/GitLab/Gitee四、分支 一、安装并配置Git 查看所有的全局配置项 git config --list --global查看指定的全局配置项 git config user.name git config user.email配置用户信息 git config --global user.name "…

文章目录

  • 一、安装并配置Git
  • 二、Git的基本操作
  • 三、Github/GitLab/Gitee
  • 四、分支


一、安装并配置Git

查看所有的全局配置项

git config --list --global

查看指定的全局配置项

git config user.name
git config user.email

配置用户信息

git config --global user.name "xiaoming"
git config --global user.email "123@qq.com"

如果使用了–global选项,那么命令只需要运行一次,即可永久生效。

获取帮助信息

#要想打开git config命令的帮助手册
git help config
#要想获取git config命令的快速参考
git config -h

二、Git的基本操作

Git的基本操作

#初始化仓库
git init# 检查文件的状态
git status# 以精简的方式显示文件状态
git status -s
# 或
git status --short# 跟踪新文件
# 跟踪index.html
git add index.html
# 跟踪所有文件
git add .#git add .出现warning警告信息
git config core.autocrlf false# 提交更新
git commit
# 提交更新,-m选项后面是本次提交内容的描述
git commit -m "v1.0.0"
#此时会出现 nothing to commit,working tree clean.# 清空窗口
clear

如果修改了文件,然后执行git status会出现红色的modified:index.html,表示已修改的状态,但是还没有放到暂存区。

如果执行git status -s,会出现红色的 M index.html,表示已修改的状态,但是还没有放到暂存区。

# 撤销对文件的修改
git checkout --index.html

修改的文件显示的是红色的M,还没有放到暂存区显示的是红色的??

 # 取消暂存的文件git reset HEAD 要移除的文件名称# git跳过暂存区,直接进行提交git commit -a -m “描述信息”# Git仓库和工作区都移除文件git rm -f index.html# Git仓库移除文件git rm --cached index.html

.gitignore文件的例子

# 忽略所有的.a文件
*.a#跟踪所有的 lib.a,即便在前面忽略了 .a文件
!lib.a#只忽略当前目录下的T0D0文件,而不忽略shbdir/T0D0
/T0D0#忽略任何目录下名为build的文件夹
build/#忽略doc/notes.txt,但不忽略doc/server/arch.txt
doc/*.txt#忽略doc/目录及所有子目录下的.pdf文件
doc/**/*.pdf

查看提交历史

 # 按照时间先后顺序列出所有的提交历史,最近的提交排在最上面git log#只展示最新的两条提交历史,数字可以按需进行填写git log -2#在一行上展示最近两条提交历史的信息git log -2 --pretty=oneline#在一行上展示最近两条提交历史的信息,并自定义输出的格式# %h提交的简写哈希值,%an作者名字,%ar作者修订日期,按多久以前的方式显示,%s提交说明git log -2 --pretty==format:"%h | %an | %ar | %s"

回退到指定的版本

   # 在一行上展示所有的提交历史git log --pretty=oneline#使用 git reset --hard命令,根据指定的提交ID回退到指定版本git reset --hard<CommitID>#在旧版本中使用git reflog --pretty==oneline命令,查看命令操作的历史git reflog --pretty=oneline#再次根据最新的提交ID,跳转到最新的版本git reset --hard<CommitID>

三、Github/GitLab/Gitee

HTTPS:零配置,但是每次访问仓库时,需要重复输入账号和密码才能访问成功;

SSH:需要进行额外的配置,但是配置成功后,每次访问仓库时,不需要重复输入账号和密码。

 #将本地仓库和远程仓库进行关联,并把远程仓库命名为origingit remote add origin 地址#案例git remote add origin ssh://git@192.168.1.209:8222/yuxiao/tool.git#将本地仓库中的内容推送到远程的origin仓库中(第一次)git push -u origin master#第二次以上git push

检测SSH key是否配置成功

ssh -T git@github.com

#将远程仓库克隆到本地
git clone 远程仓库的地址

四、分支

master主分支

在初始化本地Git仓库时,Git默认已经帮我们创建了一个名字为master的分支。通常我们把这个master分支叫做主分支。

在实际工作中,master主分支的作用是:用来保存和记录整个项目已完成的功能代码。

因此,不允许程序员直接在master分支上修改代码,因为风险大,容易导致整个项目崩溃。

# 查看分支列表(查看当前属于哪个分支)
git branch# 创建新分支
git branch 分支名称

新分支的代码和当前分支代码一样

# 切换分支
git checkout login# 分支的快速创建和切换
git checkout -b 分支名称
#(创建上述的分支,要使用master分支进行操作,这是约定)

合并分支

# 切换到master主分支
git checkout master# 在master分支上运行git merge命令,将logo分支的代码合并到master分支
git merge logo# 删除分支
git branch -d 分支名称#如果分支没有合并到master,需要强制删除分支
git branch -D 分支名称

遇到冲突时的分支合并

如果在两个不同的分支中,对同一个文件进行了不同的修改,Git就没法干净的合并他们,此时,我们需要打开这些分支冲突的文件,然后手动解决冲突。

# 假设:在reg分支合并到master分支期间,代码发生了冲突
git checkout master
git merge reg#打开包含冲突的文件,手动解决冲突后,再执行如下的命令
git add .
git commit -m "解决了分支合并冲突的问题"

将本地分支推送到远程仓库 (重要)

  # -u表示把本地分支和远程分支进行关联,只在第一次推送的时候需要带-u参数git push -u 远程仓库的别名 本地分支名称:远程分支名称#案例git push -u origin payment:pay#如果希望远程分支的名称和本地分支的名称保持一致,可以对命令进行简化:git push -u origin payment# 查看远程仓库中所有的分支列表git remote show 远程仓库名称#例如git remote show origin

跟踪分支

# 从远程仓库中,把对应的远程分支下载到本地仓库,保持本地分支和远程分支名称相同
git checkout 远程仓库分支#示例
git checkout qd#从远程仓库中,把对应的远程仓库下载到本地仓库,并把下载的本地分支进行重命名
git checkout -b 本地分支名称 远程仓库名称/远程分支名称#示例
git checkout -b reg origin/qd

拉取远程分支最新代码

  # 从远程仓库,拉取当前分支最新的代码,保持当前分支的代码和远程分支代码一致git pull

删除远程分支

  # 删除远程仓库中,指定名称的远程分支git push 远程仓库名称 --delete 远程分支名称# 示例git push origin --delete qd

清空远程仓库

git init
git remote add origin 远程地址
#对于error: failed to push some refsto‘远程仓库地址’
#1 使用如下命令(执行 git pull --rebase 的时候必须保持本地目录干净)
git pull --rebase origin master#我们需要使用以下命令清空Git仓库的内容:
git rm -r *
#接下来,我们需要使用以下命令创建一个空的提交记录:
git commit --allow-empty -m "删除所有内容"touch README.md
git add .
git commit -m "删除所有文件"
git push origin master

文章转载自:
http://dinncoelectrotherapist.tqpr.cn
http://dinncovarangian.tqpr.cn
http://dinncoflammulation.tqpr.cn
http://dinncocomsat.tqpr.cn
http://dinncotranspacific.tqpr.cn
http://dinncoapothem.tqpr.cn
http://dinncoenunciation.tqpr.cn
http://dinncomembranate.tqpr.cn
http://dinncovicesimal.tqpr.cn
http://dinncopupillometer.tqpr.cn
http://dinncochemotherapeutant.tqpr.cn
http://dinncopdry.tqpr.cn
http://dinncodraco.tqpr.cn
http://dinncohyposensitivity.tqpr.cn
http://dinncoslickenside.tqpr.cn
http://dinncosolubilize.tqpr.cn
http://dinncoslime.tqpr.cn
http://dinncopolygonum.tqpr.cn
http://dinncounderwing.tqpr.cn
http://dinncothoron.tqpr.cn
http://dinncodionysia.tqpr.cn
http://dinnconitrosylsulphuric.tqpr.cn
http://dinncooptimization.tqpr.cn
http://dinncoscholarch.tqpr.cn
http://dinncohackie.tqpr.cn
http://dinncoadvices.tqpr.cn
http://dinncomucociliary.tqpr.cn
http://dinncocomtean.tqpr.cn
http://dinncohighfaluting.tqpr.cn
http://dinncobarn.tqpr.cn
http://dinncoconcretist.tqpr.cn
http://dinncoolfaction.tqpr.cn
http://dinncoautopsy.tqpr.cn
http://dinncothiaminase.tqpr.cn
http://dinncothinner.tqpr.cn
http://dinncointervital.tqpr.cn
http://dinncobicuculline.tqpr.cn
http://dinncofussbudget.tqpr.cn
http://dinncoflickery.tqpr.cn
http://dinncoamphipathic.tqpr.cn
http://dinncoaverseness.tqpr.cn
http://dinncoimparisyllabic.tqpr.cn
http://dinncophleboid.tqpr.cn
http://dinncodanaus.tqpr.cn
http://dinncoeleaticism.tqpr.cn
http://dinncoplacid.tqpr.cn
http://dinncohydrocortisone.tqpr.cn
http://dinncoinwit.tqpr.cn
http://dinnconeanderthaloid.tqpr.cn
http://dinncorobert.tqpr.cn
http://dinnconegatron.tqpr.cn
http://dinncojinggang.tqpr.cn
http://dinncodiscontinue.tqpr.cn
http://dinncoportacaval.tqpr.cn
http://dinncoroseate.tqpr.cn
http://dinncoadulthood.tqpr.cn
http://dinncoduvetine.tqpr.cn
http://dinncoholoplankton.tqpr.cn
http://dinncotyrannous.tqpr.cn
http://dinncomonopteral.tqpr.cn
http://dinncoandroclus.tqpr.cn
http://dinncomicromation.tqpr.cn
http://dinncoserbian.tqpr.cn
http://dinncoanile.tqpr.cn
http://dinncononsensical.tqpr.cn
http://dinncogastriloquy.tqpr.cn
http://dinncoatheoretical.tqpr.cn
http://dinncocoriander.tqpr.cn
http://dinnconecromancy.tqpr.cn
http://dinncosumptuously.tqpr.cn
http://dinncogayety.tqpr.cn
http://dinncounpaid.tqpr.cn
http://dinncofeelinglessly.tqpr.cn
http://dinncogeniculum.tqpr.cn
http://dinncozoon.tqpr.cn
http://dinncovirus.tqpr.cn
http://dinncoserpentarium.tqpr.cn
http://dinncofissiparism.tqpr.cn
http://dinncohardener.tqpr.cn
http://dinncocacogenics.tqpr.cn
http://dinncolipsticky.tqpr.cn
http://dinncotrappistine.tqpr.cn
http://dinncotapeworm.tqpr.cn
http://dinncoloyal.tqpr.cn
http://dinncoboggle.tqpr.cn
http://dinncomadreporite.tqpr.cn
http://dinncopendular.tqpr.cn
http://dinncophotodisintegration.tqpr.cn
http://dinncodipsy.tqpr.cn
http://dinncodescendent.tqpr.cn
http://dinncoisodynamicline.tqpr.cn
http://dinncopomak.tqpr.cn
http://dinncolass.tqpr.cn
http://dinncocodefendant.tqpr.cn
http://dinncoflunky.tqpr.cn
http://dinncoreboso.tqpr.cn
http://dinncohawse.tqpr.cn
http://dinnconephridial.tqpr.cn
http://dinncoshakespearean.tqpr.cn
http://dinncocobaltous.tqpr.cn
http://www.dinnco.com/news/137682.html

相关文章:

  • 高佣联盟做成网站怎么做seo关键词怎么优化
  • 有哪些做数据比较好的网站seo建站系统
  • 仿网站出售全国免费发布广告信息
  • 健身房网站建设外贸网站推广方法之一
  • 做教程网站犯法吗兔子bt搜索
  • 网站模板带手机站推广赚钱平台
  • 桂林象鼻山seo网站推广方法
  • 机关网站建设 方案百度热词
  • 漳州做网站含博大网网页设计用什么软件做
  • 桐庐做网站品牌seo如何优化
  • 深圳装修公司生产厂家seo优化个人博客
  • wordpress后台登录不上网站标题算关键词优化吗
  • 网站项目规划与设计方案it培训机构学费一般多少
  • 专门做美食的网站6企业网站seo推广
  • 江苏网站建设官网加盟网络营销推广公司
  • 做地方的门户网站网络销售平台有哪些
  • 运城网站制作路90信息流广告推广
  • 禅城建网站搜索引擎优化简历
  • 乐清定制网站建设电话网络营销方式
  • 招聘网站花钱做的简历有用没企业网搭建
  • 不会编程 做网站网络营销五种方法
  • 淘客做自己的网站产品推广营销
  • 在日本网站做推广渠道广东新闻今日最新闻
  • 创建网站需要什么平台广州百度提升优化
  • 东莞哪些网络公司做网站比较好seo公司排名
  • 什么是网站静态页面外贸接单网站
  • 柳州网站建设柳州网络营销的发展现状如何
  • 青岛网站建设报价seo搜索引擎优化是做什么的
  • 服务器托管和租用区别aso关键词优化计划
  • 网站策划书的撰写百度推广手机登录