我已经创建了一个项目,我想把它存储在Gitlab中。如何使用命令行在Gitlab中创建本地仓库和远程仓库?我希望同时创建本地仓库和远程仓库。
我找到了解决方案。
以下是使用Gitlab创建本地仓库和远程仓库的步骤:
1. 运行 `git init` 命令(创建本地仓库)。 2. 运行 `git add .` 命令。 3. 运行 `git commit -m "message"` 命令。 4. 使用SSH进行Git push(创建远程仓库):
`git push --set-upstream git@gitlab.example.com:your-username/nonexistent-project.git master` 5. 使用HTTP进行Git push。
我找到了解决方案。
以下是使用Gitlab创建本地仓库和远程仓库的步骤:
1. 运行 `git init` 命令(创建本地仓库)。 2. 运行 `git add .` 命令。 3. 运行 `git commit -m "message"` 命令。 4. 使用SSH进行Git push(创建远程仓库):
`git push --set-upstream git@gitlab.example.com:your-username/nonexistent-project.git master` 5. 使用HTTP进行Git push。
git push --set-upstream https://gitlab.example.com/your-username/nonexistent-project.git master