共计 424 个字符,预计需要花费 2 分钟才能阅读完成。
1. 基础定义
本地仓库:在开发人员自己电脑上的 Git 存储库。
远程仓库:在远程服务器(如 GitLab、GitHub 等)上的 Git 存储库。
Clone:将远程仓库的内容复制到本地。
Push:将本地仓库的修改上传到远程仓库。
Pull:从远程仓库拉取最新的修改并合并到本地仓库。
2. 服务器部分
启动命令:
gitlab-ctl start
停止命令:
gitlab-ctl stop
重启命令:
gitlab-ctl restart
重新编译:
gitlab-ctl reconfigure
修改配置文件:
vim /etc/gitlab/gitlab.rb
查看默认密码:
cat /etc/gitlab/initial_root_password
开机禁用防火墙:
systemctl disable firewalld
关闭防火墙:
systemctl stop firewalld
3. web 端操作
添加公钥到 Git 服务器
将 id_rsa.pub 中的内容添加到 Git 服务器(如 GitLab)的 SSH 密钥设置中。
正文完