zoukankan      html  css  js  c++  java
  • 标准Gitlab命令行操作指导

    gitlab是一个分布式的版本仓库,总比只是一个本地手动好些,上传你的本地代码后后还能web GUI操作,何乐不为?

    贴上刚刚搭建的gitlab,看看git 如何操作标准命令行操作指导

    1.命令行操作指引

    yum install git
    Command line instructions
    You can also upload existing files from your computer using the instructions below.
    
    
    Git global setup
    git config --global user.name "alex"
    git config --global user.email "your@example.com"
    
    Create a new repository
    git clone https://gitlab.example.com/alex/test-repo.git
    cd test-repo
    touch README.md
    git add README.md
    git commit -m "add README"
    git push -u origin master
    
    Push an existing folder
    cd existing_folder
    git init
    git remote add origin https://gitlab.example.com/alex/test-repo.git
    git add .
    git commit -m "Initial commit"
    git push -u origin master
    
    Push an existing Git repository
    cd existing_repo
    git remote rename origin old-origin
    git remote add origin https://gitlab.example.com/alex/test-repo.git
    git push -u origin --all
    git push -u origin --tags

    PS:

    git for linux使用

    windows上使用Git bash教程

    2.deveolper创建分支与提交合并分支

    git -c http.sslverify=false clone https://gitlab.example.com/root/test-repo.git
    
    cd test-repo
    git checkout -b release-1.0
    #操作完成后,本地添加并提交修改后的版本分支
    git add .
    git commit -m"release-1.0"
    git-c http.sslVerify=false push origin release-l.0

    然后gitlab上提交 Create merge request,同时提示Assignee给lead看就完成deveploer的操作了,等待上级的确认操作即可

    [root@vps ~]# gitlab-ctl stop
    ok: down: alertmanager: 1s, normally up
    ok: down: gitaly: 0s, normally up
    ok: down: gitlab-exporter: 0s, normally up
    ok: down: gitlab-workhorse: 1s, normally up
    ok: down: grafana: 0s, normally up
    ok: down: logrotate: 1s, normally up
    ok: down: nginx: 0s, normally up
    ok: down: node-exporter: 1s, normally up
    ok: down: postgres-exporter: 0s, normally up
    ok: down: postgresql: 0s, normally up
    ok: down: prometheus: 0s, normally up
    ok: down: redis: 0s, normally up
    ok: down: redis-exporter: 1s, normally up
    ok: down: sidekiq: 0s, normally up
    ok: down: unicorn: 0s, normally up
    [root@vps ~]#

    PS Linux 环境下安装 GitLab 与配置

  • 相关阅读:
    小程序开发 access_token 统一管理
    python操作mysql
    Mac版本的idea非正常关闭后,idea打开项目大面积报红
    PySpider爬取去哪儿攻略数据项目
    Python3.9安装PySpider步骤及问题解决
    Selenium 自动化测试工具
    Python 抓取猫眼电影排行
    Python爬虫基本库
    Python 创建一个Django项目
    Python 数据可视化
  • 原文地址:https://www.cnblogs.com/firewalld/p/12236689.html
Copyright © 2011-2022 走看看