xiongyoutom
创建git用户
useradd git
passwd git
创建目录
mkdir /home/git/repos/app.git/ -p
初始化目录
cd /home/git/repos/app.git/
git --bare init
将主机的app.git权限更改给git用户
chown -R git.git app.git
其他主机clone下app.git
git clone git@172.16.1.32:/home/git/repos/app.git
在其他主机目录创建文件index.html
首先提交到本机仓库
git add .
查看提交状态
git status
把修改了的添加到缓存区
git add <filename>
git add *
提交改动
git commit -m "提交信息"
推送到远程仓库
git push origin master
git remote add origin <server>

分类:

技术点:

相关文章:

  • 2021-05-21
  • 2021-06-11
  • 2021-08-09
  • 2021-06-08
  • 2022-02-19
  • 2021-06-02
  • 2021-12-16
  • 2021-08-04
猜你喜欢
  • 2022-12-23
  • 2021-11-28
  • 2021-04-15
  • 2022-01-04
  • 2021-11-28
  • 2022-12-23
  • 2021-09-10
相关资源
相似解决方案