美文网首页
用命令 上传项目到gitLab

用命令 上传项目到gitLab

作者: 丶大明 | 来源:发表于2019-04-29 17:02 被阅读0次

1.在gitLab 创建好项目

2.配置好 ssh key

3.cd到你建好的项目 输入git init
有提示(Reinitialized existing Git repository in /Users..)
需要把你项目中git隐藏文件删掉 并重新 git init
defaults write com.apple.finder AppleShowAllFiles -bool true --显示文件隐藏
defaults write com.apple.finder AppleShowAllFiles -bool false --隐藏文件隐藏

  1. git add .

  2. git commit -m "commit info"

  3. git remote add origin git@github.com:yourusername/test.git

7.git pull --rebase origin master

8.git push -u origin master

大功告成!!!

相关文章

网友评论

      本文标题:用命令 上传项目到gitLab

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