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 与配置

  • 相关阅读:
    笔试题 易错题目解析
    SqlServer 函数 大全
    视频上传到自己的服务器打不开
    sql 计算生日提请日期
    Web API 异常处理(转)
    微软源代码管理工具TFS2013安装与使用详细图文教程(Vs2013)
    关于枚举的用法和类型转换
    html title换行方法 如a链接标签内title属性鼠标悬停提示内容换行
    JS的parent、opener、self对象
    uploadfiy
  • 原文地址:https://www.cnblogs.com/firewalld/p/12236689.html
Copyright © 2011-2022 走看看