jenkins插件git获得过程

using credential cb95a38d-cb88-41f6-bbb4-20882be8df32
 > /usr/bin/git rev-parse --is-inside-work-tree # timeout=10
Fetching changes from the remote Git repository
 > /usr/bin/git config remote.origin.url git@192.168.100.13:xxx/xxx.git # timeout=10
Fetching upstream changes from git@192.168.100.13:xxxx/xxx.git
 > /usr/bin/git --version # timeout=10
 > git --version # 'git version 1.8.3.1'
using GIT_SSH to set credentials 
 > /usr/bin/git fetch --tags --progress git@192.168.100.13:xxx/xxx.git +refs/heads/*:refs/remotes/origin/* # timeout=10
 > /usr/bin/git rev-parse refs/remotes/origin/xxxxx-202110191-newDevices^{commit} # timeout=10
Checking out Revision 2d20021cddf9f309c9daf8a6757c4a7fe2d6e60b (refs/remotes/origin/xxxx-202110191-newDevices)
 > /usr/bin/git config core.sparsecheckout # timeout=10
 > /usr/bin/git checkout -f 2d20021cddf9f309c9daf8a6757c4a7fe2d6e60b # timeout=10
Commit message: "Merge remote-tracking branch 'remotes/origin/feature-xxxxx' into xxxx-202110191-newDevices"
 > /usr/bin/git rev-list --no-walk 2d20021cddf9f309c9daf8a6757c4a7fe2d6e60b # timeout=10


//
获取远程分支,跟tag # git ls-remote --tags --heads https://github.com/cookieY/Yearning-gemini.git
添加一个git
  1. git init
  2.  
     
  3.  
    // 1.添加一个Origin
  4.  
    git remote add origin git@gitlab.xxx/datacenter.git
  5.  
     
  6.  
    // 2.更新Git分支信息到本地
  7.  
    git remote show
  8.  
     
  9.  
    // 3.执行拉取分支命令,git checkout -b 20170531_init_1(这个是我本地文件夹) origin/feature/20170531_init_1(这个是我远程分支分支名)
  10.  
    git checkout -b 20170531_init_1 origin/feature/20170531_init_1
     
     
     
    本地linux文件夹下执行

    git init
    7613 2022-02-15 12:07:57 root /usr/bin/git fetch --tags --progress git@192.168.0.13:xxx/manager.git +refs/heads/*:refs/remotes/origin/*
    7614 2022-02-15 12:08:03 root ls
    7615 2022-02-15 12:08:08 root /usr/bin/git checkout -f xxx-202110191-newDevices
    7616 2022-02-15 12:08:11 root ls
    7617 2022-02-15 12:08:46 root /usr/bin/git checkout -f 1.9.0
    7618 2022-02-15 12:09:03 root ls
    7619 2022-02-15 12:09:16 root /usr/bin/git checkout -t 1.9.2
    7620 2022-02-15 12:09:20 root /usr/bin/git checkout -b 1.9.2
    7621 2022-02-15 12:09:23 root ls
    7622 2022-02-15 12:09:32 root /usr/bin/git checkout -b 1.9.0
    7623 2022-02-15 12:09:39 root /usr/bin/git checkout -f 1.9.0
    7624 2022-02-15 12:10:05 root git -b
    7625 2022-02-15 12:10:58 root git branch -r
    7626 2022-02-15 12:11:20 root git branch
    7627 2022-02-15 12:14:03 root /usr/bin/git checkout -f 1.9.2
    7628 2022-02-15 12:14:07 root git branch

posted @   技术颜良  阅读(256)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 全网最简单!3分钟用满血DeepSeek R1开发一款AI智能客服,零代码轻松接入微信、公众号、小程
· .NET 10 首个预览版发布,跨平台开发与性能全面提升
· 《HelloGitHub》第 107 期
· 全程使用 AI 从 0 到 1 写了个小工具
· 从文本到图像:SSE 如何助力 AI 内容实时呈现?(Typescript篇)
点击右上角即可分享
微信分享提示