#1.安装git
apt-get install git;

#2生成公钥私钥文件
2.配置git账户:
git config --global user.name "yourname" #配置用户名,将yourname和下面的邮箱替#换成你的
git config --global user.email "youremail@xmail.com" #配置用户邮箱

#3.生成ssh密钥
ssh-keygen -t rsa -C "youremail@xmail.com"

#4.切换到根目录,进入到.ssh目录,查看公钥私钥
cd ~
ll
cd .ssh
cat id_rsa.pub

#5.克隆代码
git clone git@xxxxx:xxxx-server.git

#6.切换分支
git branch -a #查看所有分支和当前分支
git checkout -b 分支名字  origin/分支名字

  

相关文章:

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