版本控制gitlab

版本控制gitlab

版本控制介绍

版本控制是指对软件开发过程中各种程序代码、配置文件及说明文档等文件变更的管理,是软件配置管理的核心思想之一。

版本控制最主要的功能就是追踪文件的变更。它将什么时候、什么人更改了文件的什么内容等信息忠实地了记录下来。每一次文件的改变,文件的版本号都将增加。除了记录版本变更外,版本控制的另一个重要功能是并行开发。软件开发往往是多人协同作业,版本控制可以有效地解决版本的同步以及不同开发者之间的开发通信问题,提高协同开发的效率。并行开发中最常见的不同版本软件的错误(Bug)修正问题也可以通过版本控制中分支与合并的方法有效地解决。

具体来说,在每一项开发任务中,都需要首先设定开发基线,确定各个配置项的开发初始版本,在开发过程中,开发人员基于开发基线的版本,开发出所需的目标版本。当发生需求变更时,通过对变更的评估,确定变更的影响范围,对被影响的配置项的版本进行修改,根据变更的性质使配置项的版本树继续延伸或产生新的分支,形成新的目标版本,而对于不受变更影响的配置项则不应发产生变动。同时,应能够将变更所产生的对版本的影响进行记录和跟踪。必要时还可以回退到以前的版本。例如当开发需求或需求变更被取消时,就需要有能力将版本回退到开发基线版本。在曾经出现过的季度升级包拆包和重新组包的过程中,其实就是将部分配置项的版本回退到开发基线,将对应不同需求的不同分支重新组合归并,形成新的升级包版本。
版本控制是软件配置管理的核心功能。所有置于配置库中的元素都应自动予以版本的标识,并保证版本命名的唯一性。版本在生成过程中,自动依照设定的使用模型自动分支、演进。除了系统自动记录的版本信息以外,为了配合软件开发流程的各个阶段。还需要定义、收集一些元数据来记录版本的辅助信息和规范开发流程,并为今后对软件过程的度量做好准备。当然如果选用的工具支持,这些辅助数据将能直接统计出过程数据,从而方便软件过程改进活动的进行。对于配置库中的各个基线控制项,应该根据其基线的位置和状态来设置相应的访问权限。一般来说,对于基线版本之前的各个版本都应处于被锁定的状态,如需要对它们进行变更,则应按照变更控制的流程来进行操作。

常用的版本控制工具:

itlab 公司服务器搭建,用来存放开发人员的代码
svn (subversion):是一个自由开源的版本控制系统
文件和目录可以超越时空。Subversion将文件存放在中心版本库里,这个版本库很像一个普通的文件服务器,不同的是,它可以记录每一次文件和目录的修改情况,这样就可以借此将数据恢复到以前的版本,并可以查看数据的更改细节
github 国外
码云gitee 国内

gitlab部署

部署需要至少4GB内存运行,虚拟机内核也作一下调整,如果不够尽量调制最高,方便后面编译
需要的依赖包
pkgs官网
policycoreutils-python
清华大学官网
gitlab-ce

配置yum源:
[root@localhost ~]# cd /etc/yum.repos.d/
[root@localhost yum.repos.d]# rm -rf *
[root@localhost yum.repos.d]# wget /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-vault-8.5.2111.repo
[root@localhost yum.repos.d]# sed -i -e '/mirrors.cloud.aliyuncs.com/d' -e '/mirrors.aliyuncs.com/d' /etc/yum.repos.d/CentOS-Base.repo
配置epel源:
[root@localhost yum.repos.d]# yum install -y https://mirrors.aliyun.com/epel/epel-release-latest-8.noarch.rpm
[root@localhost yum.repos.d]# sed -i 's|^#baseurl=https://download.example/pub|baseurl=https://mirrors.aliyun.com|' /etc/yum.repos.d/epel*
[root@localhost yum.repos.d]# sed -i 's|^metalink|#metalink|' /etc/yum.repos.d/epel*
关闭防火墙:
[root@localhost ~]# systemctl stop firewalld.service
[root@localhost ~]# vim /etc/selinux/config
SELINUX=disabled
[root@localhost ~]# setenforce 0
[root@localhost ~]# systemctl disable firewalld.service
Removed /etc/systemd/system/multi-user.target.wants/firewalld.service.

Removed /etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service.

卸载依赖包:
[root@localhost ~]# dnf -y remove policycoreutils
安装依赖包:
[root@localhost ~]# wget http://mirror.centos.org/centos/7/os/x86_64/Packages/policycoreutils-python-2.5-34.el7.x86_64.rpm  https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7/gitlab-ce-15.3.3-ce.0.el7.x86_64.rpm
[root@localhost ~]# ls
anaconda-ks.cfg  gitlab-ce-15.3.3-ce.0.el7.x86_64.rpm  policycoreutils-python-2.5-34.el7.x86_64.rpm
[root@localhost ~]# dnf -y install epel-release git curl openssh-server openssh-clients postfix cronie perl
安装policycoreutils-python:
[root@localhost ~]# rpm -ivh --nodeps policycoreutils-python-2.5-34.el7.x86_64.rpm
warning: policycoreutils-python-2.5-34.el7.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID f4a80eb5: NOKEY
Verifying...                          ################################# [100%]
Preparing...                          ################################# [100%]
Updating / installing...

   1:policycoreutils-python-2.5-34.el7################################# [100%]
安装gitlab-ce:
[root@localhost ~]# rpm -ivh gitlab-ce-15.3.3-ce.0.el7.x86_64.rpm
warning: gitlab-ce-15.3.3-ce.0.el7.x86_64.rpm: Header V4 RSA/SHA1 Signature, key ID f27eab47: NOKEY
Verifying...                          ################################# [100%]
Preparing...                          ################################# [100%]
Updating / installing...

   1:gitlab-ce-15.3.3-ce.0.el7        ################################# [100%]
It looks like GitLab has not been configured yet; skipping the upgrade script.

       *.                  *.

      ***                 ***
     *****               *****
    .******             *******
    ********            ********
   ,,,,,,,,,***********,,,,,,,,,
  ,,,,,,,,,,,*********,,,,,,,,,,,
  .,,,,,,,,,,,*******,,,,,,,,,,,,
      ,,,,,,,,,*****,,,,,,,,,.

         ,,,,,,,****,,,,,,
            .,,,***,,,,
                ,*,.

     _______ __  __          __
    / ____(_) /_/ /   ____ _/ /_
   / / __/ / __/ /   / __ / __ \
  / /_/ / / /_/ /___/ /_/ / /_/ /
  \____/_/\__/_____/\__,_/_.___/

Thank you for installing GitLab!

GitLab was unable to detect a valid hostname for your instance.

Please configure a URL for your GitLab instance by setting external_url`
configuration in /etc/gitlab/gitlab.rb file.

Then, you can start your GitLab instance by running the following command:
  sudo gitlab-ctl reconfigure

For a comprehensive list of configuration options please see the Omnibus GitLab readme
https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/README.md

Help us improve the installation experience, let us know how we did with a 1 minute survey:
https://gitlab.fra1.qualtrics.com/jfe/form/SV_6kVqZANThUQ1bZb?installation=omnibus&release=15-3
启动postfix服务并设置开机自启:
[root@localhost ~]# systemctl enable --now postfix
Created symlink /etc/systemd/system/multi-user.target.wants/postfix.service → /usr/lib/systemd/system/postfix.service.

修改配置文件:
[root@localhost ~]# vim /etc/gitlab/gitlab.rb
external_url 'http://192.168.222.250' //修改为主机的ip
重载配置文件并重启gitlab:
第一次需要等好一会
[root@localhost ~]# export LANG=en_US.UTF-8
[root@localhost ~]# bash
[root@localhost ~]# gitlab-ctl reconfigure
....

[2022-09-23T04:44:16+08:00] INFO: Running report handlers
Running handlers complete
[2022-09-23T04:44:16+08:00] INFO: Report handlers complete
Infra Phase complete, 0/778 resources updated in 19 seconds
gitlab Reconfigured!

[root@localhost ~]# ss -antl    //有差不多24个端口
State      Recv-Q     Send-Q          Local Address:Port           Peer Address:Port     Process
LISTEN     0          1024                127.0.0.1:9121                0.0.0.0:*
LISTEN     0          1024                127.0.0.1:9090                0.0.0.0:*
LISTEN     0          1024                127.0.0.1:9187                0.0.0.0:*
LISTEN     0          1024                127.0.0.1:9093                0.0.0.0:*
LISTEN     0          1024                127.0.0.1:9100                0.0.0.0:*
LISTEN     0          1024                127.0.0.1:9229                0.0.0.0:*
LISTEN     0          128                 127.0.0.1:9168                0.0.0.0:*
LISTEN     0          1024                127.0.0.1:8080                0.0.0.0:*
LISTEN     0          511                   0.0.0.0:80                  0.0.0.0:*
LISTEN     0          128                 127.0.0.1:8082                0.0.0.0:*
LISTEN     0          128                 127.0.0.1:9236                0.0.0.0:*
LISTEN     0          1024                127.0.0.1:8150                0.0.0.0:*
LISTEN     0          128                   0.0.0.0:22                  0.0.0.0:*
LISTEN     0          1024                127.0.0.1:8151                0.0.0.0:*
LISTEN     0          1024                127.0.0.1:8153                0.0.0.0:*
LISTEN     0          100                 127.0.0.1:25                  0.0.0.0:*
LISTEN     0          1024                127.0.0.1:8154                0.0.0.0:*
LISTEN     0          1024                127.0.0.1:8155                0.0.0.0:*
LISTEN     0          128                 127.0.0.1:8092                0.0.0.0:*
LISTEN     0          511                   0.0.0.0:8060                0.0.0.0:*
LISTEN     0          1024                        *:9094                      *:*
LISTEN     0          128                     [::1]:9168                   [::]:*
LISTEN     0          128                      [::]:22                     [::]:*
LISTEN     0          100                     [::1]:25                     [::]:*
[root@localhost ~]# gitlab-ctl restart
ok: run: alertmanager: (pid 151481) 1s
ok: run: gitaly: (pid 151496) 1s
ok: run: gitlab-exporter: (pid 151526) 0s
ok: run: gitlab-kas: (pid 151566) 1s
ok: run: gitlab-workhorse: (pid 151595) 0s
ok: run: logrotate: (pid 151619) 1s
ok: run: nginx: (pid 151637) 0s
ok: run: node-exporter: (pid 151645) 1s
ok: run: postgres-exporter: (pid 151671) 0s
ok: run: postgresql: (pid 151680) 0s
ok: run: prometheus: (pid 151726) 1s
ok: run: puma: (pid 151986) 0s
ok: run: redis: (pid 152046) 1s
ok: run: redis-exporter: (pid 152056) 0s
ok: run: sidekiq: (pid 152205) 0s
查看当前的gitlab版本:
[root@localhost ~]# head -1 /opt/gitlab/version-manifest.txt
gitlab-ce 15.3.3
破解管理员密码:
[root@localhost ~]# gitlab-rails console -e production
Loading production environment (Rails 6.1.6.1)
irb(main):001:0> user = User.where(id: 1).first  //id为1的是超级管理员
=> #<user id:1 @root>
irb(main):002:0> user.password='xbz123456' //&#x5BC6;&#x7801;&#x5FC5;&#x987B;&#x81F3;&#x5C11;8&#x4E2A;&#x5B57;&#x7B26;
=> "xbz123456"
irb(main):003:0> user.password_confirmation ="xbz123456"
=> "xbz123456"
irb(main):004:0> user.save!       //&#x4FDD;&#x5B58;&#x4FEE;&#x6539;&#xFF0C;&#x82E5;&#x65E0;&#x95EE;&#x9898;&#x5C06;&#x8FD4;&#x56DE;true
=> true
irb(main):005:0> exit        //&#x9000;&#x51FA;
</user>

访问:
登录界面

版本控制gitlab
输入管理员用户以及刚刚设置的密码
版本控制gitlab
版本控制gitlab

gitlab网页界面的基本使用

更改为中文版

版本控制gitlab
版本控制gitlab
使用gitlab管理员给其他用户登录操作
版本控制gitlab
版本控制gitlab
版本控制gitlab
版本控制gitlab
版本控制gitlab
添加一个项目然后进行设置ssh免密登录
版本控制gitlab
版本控制gitlab
版本控制gitlab
版本控制gitlab
版本控制gitlab
没有公钥信息可以在服务器上面生成一个,将存放公钥目录里面的进行复制,注意空格不要复制进去了
[root@localhost ~]# ssh-keygen
Generating public/private rsa key pair.

Enter file in which to save the key (/root/.ssh/id_rsa):   //&#x5B58;&#x653E;&#x79C1;&#x94A5;&#x7684;&#x5730;&#x5740;
Created directory '/root/.ssh'.

Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /root/.ssh/id_rsa.

Your public key has been saved in /root/.ssh/id_rsa.pub. //&#x5B58;&#x653E;&#x516C;&#x94A5;&#x7684;&#x5730;&#x5740;
The key fingerprint is:
SHA256:6oKr97Grf534d1mai/LbWjuX1DZtkEGUXcOsgyQk/XY root@localhost
The key's randomart image is:
+---[RSA 3072]----+
|       .o.   o=+o|
|        .o .  ooo|
|          + . .o |
|           + Eo  |
|        S . . .o.|
|       .      o.=|
|   .. .o .  .* +.|
|  o .+o + .+*.o  |
|.oo==+...+=+++   |
+----[SHA256]-----+
[root@localhost ~]# cat /root/.ssh/id_rsa.pub  //&#x67E5;&#x770B;&#x516C;&#x94A5;&#x76EE;&#x5F55;
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDH+j7R/roIHTxgwExOsT3p9tHTwX8EQcVBJenPipZTcIwJ+snbODEOQYDfNGbsmyuTaPDzIWdcJHJXtWd4gXfquwm18Ii5qkl3HKxMs8G0/LEGhryLbX+FcslI/0JOGZuAdKfNVZV1UFarNkj8dpAqb4oeEQ8iTjUkO+qJyjY+NH3Qrxn1NR9fMy+7991WU9PCNoVIxXutohvWypiT4EM3/FndRBzZuUyN3YseOnYHjBnGoGrllABAwJaJRM9XC9YD4znXigUPUcnhC9l2PSMAQorEWfbqIttx14ttfFQrE0tOLGiIQ1N+XpkhzsJHs3iNlmPBqbqqXzTsduDQxHgrMGdwP5Kuk8fp3UP145shvUJCzYCDz0QPYO9wqwySE64iJ0lY41V0pPINqPzEsaEt7y30CvqHMSKJ7cOOj22FABuTC2GDGjsKKNSRCpRFrYq5D+Bg2oUZB52GEBxMQXyjTP9gAFlr9+pzjpHUFqTQ2wuxIqr8qoHMhQKGKbcWd8k= root@localhost

版本控制gitlab
版本控制gitlab
回到刚刚创建的项目那里
版本控制gitlab
版本控制gitlab
版本控制gitlab
创建组
版本控制gitlab
版本控制gitlab
版本控制gitlab
版本控制gitlab
版本控制gitlab
创建用户
版本控制gitlab
版本控制gitlab
版本控制gitlab
版本控制gitlab
版本控制gitlab
将用户添加到组里面
版本控制gitlab
版本控制gitlab
版本控制gitlab
版本控制gitlab
版本控制gitlab
查看刚刚添加进来的用户
版本控制gitlab
版本控制gitlab
版本控制gitlab
版本控制gitlab
创建项目让组内的成员有权限去访问
版本控制gitlab
版本控制gitlab
版本控制gitlab
版本控制gitlab
给创建的用户设置密码
版本控制gitlab
版本控制gitlab
版本控制gitlab
版本控制gitlab
使用刚刚创建的用户进行登录刚刚创建项目里面
版本控制gitlab
版本控制gitlab
版本控制gitlab
版本控制gitlab
版本控制gitlab
在项目上面上传文件
版本控制gitlab
版本控制gitlab
版本控制gitlab

使用命令行的方式进行上传文件

git clone //克隆
git add //添加
git push //上传
git commit //提交
git branch //切换
git pull //拉取

[root@localhost ~]# git clone http://192.168.222.250/gitlab-instance-75e9fc3c/xbz.git  //&#x5C06;&#x521A;&#x521A;&#x514B;&#x9686;&#x7684;&#x590D;&#x5236;&#x5230;&#x8FD9;&#x91CC;
Cloning into 'xbz'...

Username for 'http://192.168.222.250': root
Password for 'http://root@192.168.222.250':
remote: Enumerating objects: 3, done.

remote: Counting objects: 100% (3/3), done.

remote: Compressing objects: 100% (2/2), done.

remote: Total 3 (delta 0), reused 0 (delta 0), pack-reused 0
Unpacking objects: 100% (3/3), 2.79 KiB | 2.79 MiB/s, done.

[root@localhost ~]# ls
anaconda-ks.cfg                       policycoreutils-python-2.5-34.el7.x86_64.rpm
gitlab-ce-15.3.3-ce.0.el7.x86_64.rpm  xbz  //&#x53EF;&#x4EE5;&#x67E5;&#x770B;&#x5230;&#x9879;&#x76EE;
[root@localhost ~]# cd xbz/
[root@localhost xbz]# ls
README.md
[root@localhost xbz]# git config --local user.email "136@78.com" //&#x81EA;&#x5B9A;&#x4E49;&#x4E00;&#x4E0B;&#x90AE;&#x7BB1;
[root@localhost xbz]# git config --global user.name "root"
//&#x81EA;&#x5B9A;&#x4E49;&#x4E00;&#x4E0B;&#x7528;&#x6237;&#x540D;
[root@localhost xbz]# ls
README.md
[root@localhost xbz]# touch file1  //&#x521B;&#x5EFA;&#x6587;&#x4EF6;
[root@localhost xbz]# ls
README.md  file1
[root@localhost xbz]# git add file1  //&#x5C06;&#x6587;&#x4EF6;&#x6DFB;&#x52A0;
[root@localhost xbz]# git commit    //&#x63D0;&#x4EA4;&#x6587;&#x4EF6;
Aborting commit due to empty commit message.

[root@localhost xbz]# git commit -m "add file1" //&#x63D0;&#x4EA4;
[main 757d06a] add file1
 1 file changed, 0 insertions(+), 0 deletions(-)
 create mode 100644 file1
[root@localhost xbz]# git push  //&#x8FDB;&#x884C;&#x4E0A;&#x4F20;
Username for 'http://192.168.222.250': root   //&#x5982;&#x679C;&#x6CA1;&#x6709;&#x8BBE;&#x7F6E;&#x514D;&#x5BC6;&#x767B;&#x5F55;&#xFF0C;&#x8FD9;&#x91CC;&#x8981;&#x8F93;&#x5165;&#x7528;&#x6237;&#x540D;&#x548C;&#x5BC6;&#x7801;
Password for 'http://root@192.168.222.250':
Enumerating objects: 4, done.

Counting objects: 100% (4/4), done.

Delta compression using up to 4 threads
Compressing objects: 100% (2/2), done.

Writing objects: 100% (3/3), 255 bytes | 255.00 KiB/s, done.

Total 3 (delta 0), reused 0 (delta 0), pack-reused 0
To http://192.168.222.250/gitlab-instance-75e9fc3c/xbz.git
   fb8ebac..757d06a  main -> main

查看是否上传

版本控制gitlab
创建分支进行合并
[root@localhost xbz]# git branch dex
root@localhost xbz]# git push origin dex
Username for 'http://192.168.222.250': root
Password for 'http://root@192.168.222.250':
Total 0 (delta 0), reused 0 (delta 0), pack-reused 0
remote:
remote: To create a merge request for dex, visit:
remote:   http://192.168.222.250/gitlab-instance-75e9fc3c/xbz/-/merge_requests/new?merge_request%5Bsource_branch%5D=dex
remote:
To http://192.168.222.250/gitlab-instance-75e9fc3c/xbz.git
 * [new branch]      dex -> dex

可以查看到分支创建成功

版本控制gitlab
将文件上传到刚刚创建的分支里面
[root@localhost xbz]# git checkout dex  //&#x901A;&#x8FC7;&#x547D;&#x4EE4;&#x5207;&#x6362;&#x5206;&#x652F;
Switched to branch 'dex'
[root@localhost xbz]# touch files3  //&#x521B;&#x5EFA;&#x6587;&#x4EF6;
[root@localhost xbz]# git add files3  //&#x6DFB;&#x52A0;&#x6587;&#x4EF6;
[root@localhost xbz]# git commit -m "add files3" //&#x63D0;&#x4EA4;&#x4E0A;&#x4F20;&#x4FE1;&#x606F;
[dex c9b8f17] add files3
 1 file changed, 0 insertions(+), 0 deletions(-)
 create mode 100644 files3
[root@localhost xbz]# git push   //&#x7B2C;&#x4E00;&#x6B21;&#x4E0A;&#x4F20;&#x4F1A;&#x6709;&#x63D0;&#x793A;&#x8981;&#x6709;&#x4E0B;&#x9762;&#x7684;&#x547D;&#x4EE4;&#x4E0A;&#x4F20;
fatal: The current branch dex has no upstream branch.

To push the current branch and set the remote as upstream, use

    git push --set-upstream origin dex

[root@localhost xbz]# git push --set-upstream origin dex //&#x5C06;&#x4E4B;&#x524D;&#x7684;&#x5206;&#x652F;&#x5408;&#x5E76;&#x4E86;&#x7136;&#x540E;&#x4E0A;&#x4F20;
Username for 'http://192.168.222.250': root
Password for 'http://root@192.168.222.250':
Enumerating objects: 3, done.

Counting objects: 100% (3/3), done.

Delta compression using up to 4 threads
Compressing objects: 100% (2/2), done.

Writing objects: 100% (2/2), 254 bytes | 254.00 KiB/s, done.

Total 2 (delta 0), reused 0 (delta 0), pack-reused 0
remote:
remote: To create a merge request for dex, visit:
remote:   http://192.168.222.250/gitlab-instance-75e9fc3c/xbz/-/merge_requests/new?merge_request%5Bsource_branch%5D=dex
remote:
To http://192.168.222.250/gitlab-instance-75e9fc3c/xbz.git
   757d06a..c9b8f17  dex -> dex
Branch 'dex' set up to track remote branch 'dex' from 'origin'.

查看上传

版本控制gitlab
再次创建文件进行上传
第二次上传就不用执行合并那个操作
[root@localhost xbz]# touch files4
[root@localhost xbz]# git add files4
[root@localhost xbz]# git commit -m "add files4"
[dex b6b67c6] add files4
 1 file changed, 0 insertions(+), 0 deletions(-)
 create mode 100644 files4
[root@localhost xbz]# git push
Username for 'http://192.168.222.250': root
Password for 'http://root@192.168.222.250':
Enumerating objects: 3, done.

Counting objects: 100% (3/3), done.

Delta compression using up to 4 threads
Compressing objects: 100% (2/2), done.

Writing objects: 100% (2/2), 223 bytes | 223.00 KiB/s, done.

Total 2 (delta 1), reused 0 (delta 0), pack-reused 0
remote:
remote: To create a merge request for dex, visit:
remote:   http://192.168.222.250/gitlab-instance-75e9fc3c/xbz/-/merge_requests/new?merge_request%5Bsource_branch%5D=dex
remote:
To http://192.168.222.250/gitlab-instance-75e9fc3c/xbz.git
   c9b8f17..b6b67c6  dex -> dex

查看上传

版本控制gitlab
对上传的文件进行拉取
将别的分支的文件拉取到你需要的那个分支里面
[root@localhost xbz]# git checkout main //&#x5207;&#x6362;&#x5230;main&#x5206;&#x652F;
Switched to branch 'main'
Your branch is up to date with 'origin/main'.

[root@localhost xbz]# git pull origin dex  //&#x5C06;dex&#x8FD9;&#x4E2A;&#x5206;&#x652F;&#x91CC;&#x9762;&#x7684;&#x6587;&#x4EF6;&#x90FD;&#x62C9;&#x53D6;&#x5230;&#x672C;&#x5730;&#x4E0A;&#x9762;&#x4E86;
warning: Pulling without specifying how to reconcile divergent branches is
discouraged. You can squelch this message by running one of the following
commands sometime before your next pull:

  git config pull.rebase false  # merge (the default strategy)
  git config pull.rebase true   # rebase
  git config pull.ff only       # fast-forward only

You can replace "git config" with "git config --global" to set a default
preference for all repositories. You can also pass --rebase, --no-rebase,
or --ff-only on the command line to override the configured default per
invocation.

Username for 'http://192.168.222.250': root
Password for 'http://root@192.168.222.250':
From http://192.168.222.250/gitlab-instance-75e9fc3c/xbz
 * branch            dex        -> FETCH_HEAD
Updating 757d06a..b6b67c6
Fast-forward
 files3 | 0
 files4 | 0
 2 files changed, 0 insertions(+), 0 deletions(-)
 create mode 100644 files3
 create mode 100644 files4
[root@localhost xbz]# git push //&#x53EF;&#x4EE5;&#x76F4;&#x63A5;&#x4F7F;&#x7528;push&#x4E0A;&#x4F20;
Username for 'http://192.168.222.250': root
Password for 'http://root@192.168.222.250':
Total 0 (delta 0), reused 0 (delta 0), pack-reused 0
To http://192.168.222.250/gitlab-instance-75e9fc3c/xbz.git
   757d06a..b6b67c6  main -> main

查看上传

版本控制gitlab

Original: https://www.cnblogs.com/tushanbu/p/16721426.html
Author: 涂山布
Title: 版本控制gitlab

原创文章受到原创版权保护。转载请注明出处:https://www.johngo689.com/573946/

转载文章受原作者版权保护。转载请注明原作者出处!

(0)

大家都在看

  • 2021年3月-第01阶段-Linux基础-Linux系统的启动流程

    Linux系统的启动流程 理解Linux操作系统启动流程,能有助于后期在企业中更好的维护Linux服务器,能快速定位系统问题,进而解决问题。 上图为Linux操作系统启动流程 1….

    Linux 2023年6月8日
    0107
  • 001.AD域控简介及使用

    一 AD概述 域(Domain)是Windows网络中独立运行的单位,域之间相互访问则需要建立信任关系。 当一个域与其他域建立了信任关系后,2个域之间不但可以按需要相互进行管理,还…

    Linux 2023年6月7日
    0119
  • 百度云虚拟主机BCH安装PHP框架CodeIgniter

    注意:fastcgi_param SCRIPT_FILENAME /home/bae/app/index.php;这一项中的路径,这个百度云虚拟主机的手册有说明。 将该配置文件(b…

    Linux 2023年6月13日
    097
  • ASP.NET Core 2.2 : 二十七. JWT与用户授权(细化到Action)

    上一章分享了如何在ASP.NET Core中应用JWT进行用户认证以及Token的刷新,本章继续进行下一步,用户授权。涉及到的例子也以上一章的为基础。(ASP.NET Core 系…

    Linux 2023年6月7日
    090
  • Python2中快速获取本地时区当天0点时间戳的一种方法

    如下所示,看了网上的几种方法,这种方法算是代码量比较小的,同时可以保证求的是本地时区的0点时间戳,返回的是浮点数,需要的话自己转一下int In [1]: import time …

    Linux 2023年6月6日
    081
  • Django orm的managed参数

    Django orm的managed参数 如果一张表不是在django的models.py中创建表,而是该表由cmd或者Navicat或者其他方式创建的,或者该表是一个视图,那么也…

    Linux 2023年6月14日
    079
  • 计算机网络基础

    计算机网络基础 计算机网络的定义和功能 计算机网络是利用通信设备和线路,将分布在地理位置不同的、功能独立的多个计算机系统连接起来,以功能完善的网络软件(网络通信协议及网络操作系统等…

    Linux 2023年6月7日
    080
  • 对不起

    如果您看到此页面,代表作者并没有完成此链接所指向的博文。请神犇们原谅本蒟蒻,本人承诺将尽快更新。 Original: https://www.cnblogs.com/Grharri…

    Linux 2023年6月6日
    088
  • 线程

    一、线程概念的引入 进程 之前我们已经了解了操作系统中进程的概念,程序并不能单独运行,只有将程序装载到内存中,系统为它分配资源才能运行,而这种执行的程序就称之为进程。程序和进程的区…

    Linux 2023年6月14日
    086
  • 【证券从业】金融基础知识-第四章 股票02

    注1:后续学习并整理到第八章,全书完结后再合并成一个笔记进行源文件分享 注2:本章内容巨多,大约分为两篇文章记录消化 posted @2022-06-06 02:11 陈景中 阅读…

    Linux 2023年6月13日
    099
  • Cisco 7200 路由 PPPOE 拨号详解

    R1(config)#vpdn enable #启用vpdn虚拟专用拨号网络 R1(config)#interface dialer 1 #定义拨号器1 R1(config-if)…

    Linux 2023年6月6日
    088
  • 给你的计算机集群加一道安全屏障

    之前的LAXCUS集群操作系统系列文章介绍过,LAXCUS把集群分成内外两个网络环境。内网归管理员掌控,外网由用户操作,中间由网关连接,网关起着反向代理的作用,负责转发内外网络的通…

    Linux 2023年6月6日
    085
  • 安装完Ubuntu启动时自动进入grub命令行模式的解决办法

    1.先使用ls命令,找到Ubuntu的安装在哪个分区: grub>ls 会罗列所有的磁盘分区信息,比方说: (hd0,1),(hd0,5),(hd0,3),(hd0,2) 2…

    Linux 2023年6月13日
    082
  • 如何写出健壮可靠的shell脚本

    1 脚本失败时即退出 ; set -e 例子: 可以在脚本的开头设置如下set -e 2 打印脚本执行过程 sh -x test.sh #整个过程执行了哪些命令或者在开头加上set…

    Linux 2023年5月28日
    079
  • shell脚本并发执行

    简单的并发脚本 如果shell不能执行,或者报格式错误,记得用 Original: https://www.cnblogs.com/phpdragon/p/10511256.htm…

    Linux 2023年5月28日
    089
  • linux学习之shell脚本

    【实验目的】‍ ‌ 通过本实验练习,使学生了解常用SHELL的编程特点,掌握SHELL 程序设计的基础知识。对SHELL程序流程控制、SHELL程序的运行方式、bash程序的调试方…

    Linux 2023年5月27日
    0120
亲爱的 Coder【最近整理,可免费获取】👉 最新必读书单  | 👏 面试题下载  | 🌎 免费的AI知识星球