I created a repository on Github with Replit, but my code is not importing

Question: I recently connected my Github account to my Replit account and I wanted to create a repository for one of my projects, so opened the git tab in the Replit editor and created a repository, but when I checked over on Github, the repository was there, but my code was not. Is there a way to push code from an already created Repl to an empty repository?

Where it says Remote, under that, add .git to the current URL and press ✓ Save. Then, push and commit.

For future reference, the “Remote” URL is the URL you can find under the green Code dropdown on your GitHub Repo (in that screenshot, it’s the “Quick setup–if you’ve done this kind of thing before” link):

Nah, I’ve done this before. You have to use the HTTPS/.git URL as the remote URL, because Replit is technically running the git commands behind the UI.

I added .git to the end of the current remote, pressed save, and reloaded the github page, but nothing happened.

1 Like

Did you make sure to push and commit all changes again?

1 Like

I don’t know how to do that :neutral_face:

1 Like

Go back to the main Git page, then click :repeat: next to the :low_brightness: (settings). Then click ‘Push’ when it lights up.

1 Like

You should get to here, and then write a message and click the blue:


I don’t see a push button.

Click the main branch under Current Branch and you should see it.

1 Like

I commited the changes under the message “Import” but nothing changed on the github page. Should I add .git to the remote and try again?

Nevermind, It worked.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.