美文网首页
用git上传文件到 gitlab

用git上传文件到 gitlab

作者: Didex | 来源:发表于2017-03-07 22:19 被阅读0次
  1. 下载Git,在Git Bash中输入 ssh-keygen -t rsa -C "your_email@youremail.com"

  2. 在根目录下找到 id_rsa.pub文件,复制全部内容(密匙)

  3. 打开个人gitlab,进入Settings,选择SSH Keys,Add SSH Key,粘贴上述密匙

  4. 配置本地仓库
    git config --global user.name "your name"
    git config --global user.email "your_email@example.com"

  5. 转换到本地仓库目录 输入 git add .

  6. 输入commit git commit -m "your commit"

  7. 上传到gitlab git push origin master

相关文章

网友评论

      本文标题:用git上传文件到 gitlab

      本文链接:https://www.haomeiwen.com/subject/fhevgttx.html