【git & gerrit & shell】教程文章相关的互联网学习教程文章

Jenkins+maven+gitlab+shell实现项目自动化部署

确认jdk , maven,git这些已经在服务器上搭建成功,gitlab使用的是公司服务也没有进行搭建 下面是jenkins的两种搭建方式 1. 第一种比较简单下载对应jenkins.war包启动命令如下 wget http://mirrors.jenkins.io/war/latest/jenkins.war nohupjava -jar jenkins.war --httpPort=8081& 2. 使用install来进行安装wget–O/etc/yum.repos.d/jenkins.repo http://pkg.jenkins-ci.org/redhat-stable/jenkins.repo rpm --importhttps:...

git别名;git配置使用shell函数;git别名使用shell函数;git获取当前分支;git alias【代码】

获取当前分支git symbolic-ref -q --short HEAD 2. 在git别名里使用shell函数,$1获取第一个参数的值,$2……$n依次类推,根据自己习惯需要定制 3. 提交review的正确语句是: git push origin HEAD:refs/for/destination_branch 意思是---把当前分支的代码推送到远程origin仓库的review分支destination_branch上去 origin表示远程git服务器地址;HEAD表示当前分支;refs/for/destination_branch 表示远程rev...

linux 远程拉取码云上git代码 shell脚本

#/bin/sh # git yum安装 检查git 是否存在 存在不安装 git --version if [ $? -ne 0 ];then yum install git if [ $? -ne 0 ];then echo "yum安装失败!" exit 0 fi fi getParam(){ read -p $1 param error if [[ $error =~ "n" ]];then getParam $1 fi } #设置user and email view_val="请录入user.name/错误请空格,录入n:" read -p $view_val username error if [[ $error =~ "n" ]];then getParam $view_val use...

Vim、Linux、Shell、Idea、Git命令总结【代码】

目录Vim 剪切 复制shell idea centosVim /名字 搜索关键词 :u 撤销上一次操作 v 进入可视模式(选中模式) 剪切 回到顶部 命令模式下的剪切 dd,删除一整行==剪切 p小写p代表贴至游标后(下)。 P大写P代表贴至游标前(上)。 首先,可以在命令模式下输入v进入自由选取模式,选择需要剪切的文字后,按下d就可以进行剪切了。 其他命令模式下剪切命令: dd:剪切当前行 ndd:n表示大于1的数字,剪切n行 dw:从光标处剪...

shell脚本实现git快速提交代码与快速回滚【代码】【图】

shell脚本实现git快速提交代码与快速回滚 创建一个commit库: [root@centos-3 cml]# echo "check github" > index.html[root@centos-3 cml]# cat index.htmlcheck github[root@centos-3 cml]# git add index.html[root@centos-3 cml]# git commit -m "check github"[master b357825] check github1 files changed, 1 insertions(+), 1 deletions(-)[root@centos-3 cml]# git pushCounting objects: 5, done.Compressing objects: 1...