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

赫章网站建设网站建设zgkr

赫章网站建设,网站建设zgkr,网站购物车代码怎么做,做百度网站第三周 Tursday 早 git日志的安装使用 [rootweb ~]# yum -y install git.x86_64 //安装软件包 [rootweb ~]# rpm -ql git //查看git的包 ​ [rootweb ~]# mkdir /yy000 //创建新目录 [rootweb ~]# cd /yy000/ [rootweb yy000]# git init //将当前目录做为仓库…

第三周 Tursday

git日志的安装使用

[root@web ~]# yum -y install git.x86_64   //安装软件包
[root@web ~]# rpm -ql git      //查看git的包
​
[root@web ~]# mkdir /yy000    //创建新目录
[root@web ~]# cd /yy000/
[root@web yy000]# git init      //将当前目录做为仓库
初始化空的 Git 版本库于 /yy000/.git[root@web yy000]# git commit -m "新增了一个Test..java文件,这是新建的"
​
*** Please tell me who you are.
​
Run
​git config --global user.email "you@example.com"git config --global user.name "Your Name"
​
to set your account's default identity.
Omit --global to set the identity only in this repository.
​
fatal: unable to auto-detect email address (got 'root@git22.(none)')
[root@web yy000]# 
​
[root@web yy000]# git config --global user.email 123456789@163.com   //添加邮箱
[root@web yy000]# git config --global user.name cc       //添加用户
[root@web yy000]# #修改Test.java文件,一行注释
[root@web yy000]# echo "//这是一行java注释" > Test.java 
[root@web yy000]# git log
fatal: bad default revision 'HEAD'             //发现日志没有更新
[root@web yy000]# git add 
没有指定文件,也没有文件被添加。
也许您想要执行 'git add .'?
[root@web yy000]# git add .                //将文件提交到缓存
[root@web yy000]# git commit -m "这是第二次提交"      //说明
[master(根提交) 976d532] 这是第二次提交1 file changed, 1 insertion(+)create mode 100644 Test.java
[root@web yy000]# git log             //查看历史
commit 976d5322e80345dbc0c5b89250f1c0dd8006f9f4
Author: cc <123456789@163.com>
Date:   Thu Jul 25 10:50:35 2024 +0800
​这是第二次提交
[root@web yy000]# 

分支的使用

[root@web yy000]# ls
Test.java
[root@web yy000]# #查看当前仓库的分支
[root@web yy000]# git branch
* master
[root@web yy000]# cat Test.java 
//这是一行java注释
[root@web yy000]# git branch abranch    //创建分支
[root@web yy000]# git branchabranch
* master
[root@web yy000]# #切换到a分支上
[root@web yy000]# git checkout abranch
切换到分支 'abranch'
[root@web yy000]# git branch
* abranchmaster
[root@web yy000]# ls 
Test.java
[root@web yy000]# cat Test.java 
//这是一行java注释
[root@web yy000]# echo "//我是a员工" >> Test.java 
[root@web yy000]# cat Test.java 
//这是一行java注释
//我是a员工
[root@web yy000]# git add .
[root@web yy000]# git commit -m "a员工提交内容"
[abranch a593f7d] a员工提交内容1 file changed, 1 insertion(+)
[root@web yy000]# git checkout master
切换到分支 'master'
[root@web yy000]# git branch abranch
* master
[root@web yy000]# cat Test.java 
//这是一行java注释
[root@web yy000]# git checkout abranch
切换到分支 'abranch'
[root@web yy000]# cat Test.java 
//这是一行java注释
//我是a员工
[root@web yy000]# git checkout -b bbranch   //创建并切换分支
切换到一个新分支 'bbranch'
[root@web yy000]# git branchabranch
* bbranchmaster
​
[root@git22 yy000]# git branch -d abranch   //删除分支
已删除分支 abranch(曾为 a593f7d)。
​

删除分支,要求是分支已经合并

  1. git branch -d 分支名

  2. git branch -D 分支名

分支冲突

将两个分支合并

git checkout abranch

git merge bbranch 在a分支合并b分支

a分支和b分支都对同一个文件进行了修改,并且commit,

合并的时候,就是保分支冲突,需要手动选择,再提交就可以了

部署 Gitlab 服务器

yum -y install git # 安装git

yum -y install curl openssh-server postfix cronie policycoreutils-python # 安装依赖环境

wget --content-disposition https://packages.gitlab.com/gitlab/gitlab-ce/packages/el/8/gitlab-ce-12.10.14-ce.0.el8.x86_64.rpm/download.rpm # 下载gitlab软件包

加载配置并启动 gitlab

gitlab-ctl reconfigure

浏览器访问 gitlab

当前网站:http://192.168.33.11

http://www.yayakq.cn/news/697065/

相关文章:

  • 不用下载能直接进入的正能量网站中国设计师协会
  • php网站开发总结广西专业网站建设
  • 站长工具seo综合查询排名工业产品设计网
  • 公司网站建设费计入哪个科目商城网站流量
  • wordpress怎么自定义sem优化托管公司
  • 为什么网站不需要icp备案上海模板建站源码
  • 关于建设网站的经费请示平江外贸网站推广找哪家
  • 建设网银怎么提高转账限额包年seo和整站优化
  • 天津整站网站后台更新文章 前台不显示
  • 网站建设销售是什么成都平台网站开发公司
  • 网站正在建设中的专业北京网站建设公司排名
  • wordpress做淘宝客网站在线快速建站
  • 网站开发服务单位四川销售应用app
  • 创意设计网站大全网网站建设设计公司
  • 品质网站设泰安网上申请货车通行证
  • 网站系统 深圳博域通讯关键词推广分析
  • 校园网站建设培训体会郑州seo管理
  • 郑州网站建设规划网站分站开发计划书
  • 吉林天宇建设集团网站wordpress 物流
  • 外宣做网站宣传西安有没有网站建设和营销的培训
  • 怎样登陆网站后台软文自动发布软件
  • 中国最大网站建设公司梵客家装收费标准
  • 域名解析手机网站建设优秀包装设计案例
  • 银川网站建设redu深圳网站建设网牛天下
  • 毕节做网站优化wordpress特点
  • 白云外贸型网站建设湖南送变电建设公司 网站
  • 小企业网站建设系统哪个好网站开发支持环境
  • wordpress+vps建站郑州市建设网站
  • 7k7k网页游戏官网西seo优化排名
  • 太原做网站的公司网站建设山东青岛网站制作