【问题标题】:Push my project to GitLab [closed]将我的项目推送到 GitLab [关闭]
【发布时间】:2015-07-02 17:24:34
【问题描述】:

我是第一次使用 Git,有人可以帮助我,我有用户名、密码和项目存储库,我会使用 windows 7 将我的项目推送到 Gitlab 到这个存储库。 谢谢

【问题讨论】:

  • 很高兴听到您开始学习 Git,它非常有用。 Stack Overflow 可能不是解决此类一般性问题的最佳场所,我会尝试从互联网上尽可能多地学习,然后带着具体问题来到这里。查看来自 Atlassian 的精彩 git 教程:atlassian.com/git/tutorials

标签: gitlab


【解决方案1】:

如果您声明了一个空的 Git 存储库(请参阅 Create Project),您可以转到本地项目并:

cd /path/to/my/local/project:
git init .
git add -A .
git commit -m "First commit"
git remote add origin https://<myLogin>@<mygitlab>/<mylogin>/<myproject>
git push -u -f origin master 
#The -f flag stands for force. This will automatically overwrite everything in the remote directory. We're only using it here to overwrite the README that GitHub automatically initialized.

注意:要获取 Git,只需将PortableGit-2.4.5.1-4th-release-candidate-64-bit.7z.exe 解压缩到您想要的任何位置,然后将C:\path\to\PortableGit-2.4.5.1-4th-release-candidate-64-bit\cmd 添加到您的%PATH%

【讨论】:

  • 应该是 git remote add origin https://@//
  • @Amansharma 谢谢。我已经相应地编辑了答案。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2020-02-21
  • 2018-05-24
  • 2013-11-25
  • 1970-01-01
  • 2017-01-28
  • 1970-01-01
相关资源
最近更新 更多