Git服务器配置及本地克隆提交、服务器获取,git服务器配置


1、服务器Git安装配置

相关链接

相关链接

注意ssh-keygen 、修改权限

权限:    相关链接

 

2、本地获取

git clone name@ip:服务器项目位置

相关链接

 

3、创建本地分支推送到远程

    git branch name

    git push origin name

   3.1 服务器权限配置(git仓库同级目录下)

    chown -R user:suergroup  git仓库名称

 

4、本地分支和远程分支关联

相关链接

 使用命令git branch --set-upstream ;实例如下,其中debug为创建的分支

  git branch --set-upstream debug origin/debug



5、add commit push提交(版本创建)
  git push origin name


6、服务器获取git clone(在srv/www/目录下克隆,git clone 仓库路径)
官网
相关链接

相关内容