【问题标题】:How to create a local repository and remote repository in Gitlab using command line?如何使用命令行在 Gitlab 中创建本地存储库和远程存储库?
【发布时间】:2018-08-12 17:31:44
【问题描述】:

我创建了一个项目。我想将我的项目存储在 Gitlab 中。如何使用命令行在 Gitlab 中创建本地存储库和远程存储库? 我正在寻找创建本地存储库和远程存储库的创建。

我得到了解决方案。 使用 Gitlab 创建本地仓库和远程仓库的步骤。

  1. git init(已创建本地存储库)
  2. git add .
  3. git commit -m "message"
  4. 使用 SSH 的 Git 推送(已创建远程存储库):

git push --set-upstream git@gitlab.example.com:your-username/nonexistent-project.git master

使用 HTTP 的 Git 推送:

git push --set-upstream https://gitlab.example.com/your-username/nonexistent-project.git master

【问题讨论】:

标签: git gitlab


【解决方案1】:

使用 Gitlab 创建本地仓库和远程仓库的步骤。

  1. git init(已创建本地存储库)
  2. git add .
  3. git commit -m "message"
  4. 使用 SSH 的 Git 推送(已创建远程存储库):

    git push --set-upstream git@gitlab.example.com:namespace/nonexistent-project.git master
    

    使用 HTTP 的 Git 推送:

    git push --set-upstream https://gitlab.example.com/namespace/nonexistent-project.git master
    

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2012-02-02
    • 1970-01-01
    • 2020-01-09
    • 1970-01-01
    • 2016-01-11
    • 2013-11-04
    • 1970-01-01
    相关资源
    最近更新 更多