摘要:1.创建一个仓库 1.1 登录码云,选择创建仓库 1.2 创建一个仓库 比如叫 Git 1.3 Git仓库下,点击 管理 1.4 根据自己的需求,选择是否将仓库设置为 开源仓库,就是所有人都可以看你写的代码 2. 仓库的使用 2.1 此时返回Git仓库的首页,此时默认只有一个主分支,复制主分支 HT
阅读全文
摘要:1.卸载防火墙、关闭Selinux ]# yum -y remove firewalld ]# sed -i 's/SELINUX=enforcing/SELINUX=disabled/g' /etc/selinux/config 2.添加gitlab用户 ]# useradd -s /sbin/n
阅读全文
摘要:4.1 搭建Git服务器 git1 ]# git config --global user.name "user1" ]# git config --global user.email user1@example.com ]# groupadd git ]# useradd git -g git ]
阅读全文
摘要:3.1 分支的创建与合并 # 创建分支 git]# git branch br1 # 切换到分支 git]# git checkout br1 Switched to branch 'br1' # 查看 git]# git branch * br1 master # git checkout -b
阅读全文
摘要:2.1 初始化Git仓库 创建的git目录下 git]# git init # 创建文件并提交 git]# echo 111 > 1.txt git]# git status -s ?? 1.txt git]# git add 1.txt git]# git status -s A 1.txt gi
阅读全文
摘要:1.Git基础配置 1.1 Git 的三种状态 已提交(committed)、已修改(modified) 和 已暂存(staged)。 1.2 Git的工作流程 基本的 Git 工作流程如下: 在工作区中修改文件; 将你想要下次提交的更改选择性地暂存,这样只会将更改的部分添加到暂存区; 提交更新,找
阅读全文