1、Git 常规操作
(1)提交过程
(2)Git 全局配置
配置全局用户名和邮箱
git config --global user.name "username"
git config --global user.email "email"
修改全局用户名和邮箱
git config --replace-all user.name "new_username"
git config --replace-all user.email "new_email"
(3)服务器 => 本地
命令为git clone
git clone http://106.52.96.138:8090/Tellsea/boot-gitlab-jenkins.git
(4)本地 => 服务器
Git 初始化
git init
查看文件状态,红色为未提交的,绿色为已提交的
git status
将文件添加为提交状态,一个点代表所有文件,也可以只提交一个文件
git add .
添加注释信息
git commit -m "注释信息,提交内容"
提交到远程服务器
git push origin master
提交完成!
如果首次提交失败,可以使用下面的命令,第一次提交需要输入用户名和密码
git merge origin master
git pull origin master
git push http://106.52.96.138:8090/Tellsea/boot-gitlab-jenkins.git master