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

  • 相关阅读:
    GridView中CheckBox,RadioButton并存的同时且有相互关系
    SQL重复记录查询
    TextArea的长度限定
    如何获取程序当前目录
    手机归属地查询
    如何更改ComboBox下拉列表的文字颜色
    世界上主要的一些搜索引擎
    WF/WCF/WCS/WPF/MVC/AJAX/RBAC/SOAP/SCRUM
    .Net Framework 3.5 结构图
    如何打开网页链接
  • 原文地址:https://www.cnblogs.com/firewalld/p/12236689.html
Copyright © 2011-2022 走看看