<Linux> git

在使用git之前,要先在linux中安装git

yum list | grep git
yum install -y 文件名

在第一次安装git时,需要进行下面的操作

git config --global user.email "你的邮箱名"
git config --global user.name "你想要的名字"

1. git clone

         在xshell中,git clone 粘贴上链接

git clone ​​https://gitee.com/high-limit/linux-project.git

        第一次clone会要求用户名与密码(gitee的账号和密码),然后就把仓库拉取下来了,

2. git add 

git add .
//将文件夹内所有的没有被添加到仓库的文件添加到仓库中

        如果文件之后再次被修改,那么还需要add。对文件的增删改都是要add的,此时add的是变化的部分 

3. git commit

git commit -m "提交日志"

        必须要有 -m 

注意:提交日志不能胡写,要有意义

4. git push

git push

push后,会要求输入密码,即gitee的密码

5. git log

        可以查看提交日志

6. git status 

git status

        查看仓库提交情况

7. gitignore

        如果要在内部添加新的要忽略的文件后缀,记得要加上通配符*

*.d
*.p
等等

  • 7
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
<builders> <org.jenkinsci.plugins.conditionalbuildstep.singlestep.SingleConditionalBuilder plugin="conditional-buildstep@1.4.2"> <condition class="org.jenkins_ci.plugins.run_condition.contributed.ShellCondition" plugin="run-condition@1.5"> <command>if git show --summary HEAD | grep -q -E "\(cherry picked from commit \b[0-9a-f]{5,40}\b\)"; then exit 1 fi</command> </condition> <buildStep class="hudson.tasks.Shell"> <command>./scripts/checkpatch.pl --min-conf-desc-length=1 --ignore GERRIT_CHANGE_ID -g HEAD </command> <configuredLocalRules/> </buildStep> <runner class="org.jenkins_ci.plugins.run_condition.BuildStepRunner$Run" plugin="run-condition@1.5"/> </org.jenkinsci.plugins.conditionalbuildstep.singlestep.SingleConditionalBuilder> <hudson.tasks.Shell> <command>NCPU=$(expr $(nproc --all ) / 2) make O=build-${BUILD_ID} -s defconfig make O=build-${BUILD_ID} -j$NCPU -s Image make O=build-${BUILD_ID} -j$NCPU -s modules make O=build-${BUILD_ID} INSTALL_MOD_PATH=../install-${BUILD_ID} -s modules_install mkdir -p install-${BUILD_ID}/boot/ KERNELVER=$(cat build-${BUILD_ID}/include/config/kernel.release 2> /dev/null) cat build-${BUILD_ID}/arch/arm64/boot/Image > install-${BUILD_ID}/boot/Image-$KERNELVER cp build-${BUILD_ID}/System.map install-${BUILD_ID}/boot/System.map-$KERNELVER cp build-${BUILD_ID}/.config install-${BUILD_ID}/boot/config-$KERNELVER tar -cJf install-${BUILD_ID}/linux-$KERNELVER.tar.xz -C install-${BUILD_ID}/ boot lib</command> <configuredLocalRules/> </hudson.tasks.Shell> <hudson.tasks.Shell> <command>cd $HOME/src/linux git fetch -p -t git pull </command> <configuredLocalRules/> </hudson.tasks.Shell> </builders> 这是一段Jenkins job的定义,请把它转成对应的JJB的yaml格式配置文件
07-15
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值