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?
CodePudding user response:
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