如何推向gitlab而不是github

发布于 2025-01-31 06:11:07 字数 104 浏览 1 评论 0原文

我将文件克隆到gitlab,创建了一个新的分支,编辑了文件并最终将其推开。但是,它以某种方式创建了一个新的存储库,这是我的github中的一个新分支,我的gitlab中没有任何东西。我应该怎么办

I cloned the files in gitlab, created a new branch, edited the files and finally pushed it. But somehow it created a new repository, a new branch in my github and has nothing in my gitlab. What should i do

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

晒暮凉 2025-02-07 06:11:07

检查您的git Remote -V在本地克隆存储库的根文件夹中输出。

如果您“将文件克隆到gitlab中”,则URL应该是gitlab One(https://gitlab.com/...或ssh git@gitlab:.. .. 。

如果没有,您可能会看到一个github url。

将其更改为现有的远程gitlab。

git remote set-url origin https://gitlab.com/You/YourRepo

Check your git remote -v output in the root folder of your local cloned repository.

If you had "cloned the files in gitlab", the URL should have been a GitLab one (https://gitlab.com/... or an SSH git@gitlab:...)

If not, you might see a GitHub URL.

Changing it to an existing remote GitLab one would be:

git remote set-url origin https://gitlab.com/You/YourRepo
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文