如何将我的repl.it replion连接到现有的github存储库?

发布于 2025-02-07 10:05:29 字数 264 浏览 2 评论 0原文

我正在使用nodejs开发一个自定义的Discord机器人,并在reppl上托管了一段时间。我将重置连接到github存储库以进行版本控制,但后来我不得不分叉并创建一个新的。我删除了旧的重复。

现在,当我对新的替补进行更改并尝试对GitHub存储库进行更改时,没有任何更改(新提交不会显示在Github上,而是出现在Replit上)。 Replit中有一个按钮“连接到GitHub”,只能让我创建一个我不想要的新存储库。我想将我的新REPL链接到旧的GitHub存储库。

我该如何实现?

I am developing a custom Discord bot using NodeJS and have been hosting it on Repl.it for some time. I connected my repl to a GitHub repository for version control but later I had to fork my repl and create a new one. I deleted the old repl.

Now, when I make a change on the new repl and try to commit the changes to the GitHub repository, nothing changes (the new commits do not show up on GitHub but do show up on Replit). There is a button "Connect to GitHub" in Replit which only lets me create a new repository which I do not want. I want to link my new repl to my old GitHub repository.

How can I achieve this?

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

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

发布评论

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

评论(1

铃予 2025-02-14 10:05:30

reveit 提供shell> shell and git直接命令,这更方便。

您可以创建一个新的存储库,然后单击shell(在右图中)。

键入以下内容;

git init
git remote add origin <git_url>
git fetch
git reset origin/<branch_name> --hard

完成后,左图中的版本控制也将同步。

当然,您还可以使用shell来推动Repeit Reploge进行的更改。

git push origin master

Replit provides a shell and has git installed, so you can use the shell to run git commands directly, which is more convenient.

You can create a new repo, and click shell (in the right panel).

Type the following;

git init
git remote add origin <git_url>
git fetch
git reset origin/<branch_name> --hard

Once done, the version control in the left panel will also be synchronized.

Of course, you can also push changes made in replit back to GitHub, also using the shell.

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