Difficulty: Easy
Using version control (Git) is relatively easy with Replit. Once it is set up, it's a matter of few clicks to start tracking your code changes. There is no need to install any apps.
Read the documentation from Replit:
Step 1.
Log in to your Replit account. On the top right corner, click on your avatar and choose Account.
Step 2.
Go to the left side and choose Connected services. Click Connect for GitHub.
Step 3.
When a new tab opens (or the page redirects to a page) that asks if Replit can get permission, click on Authorize Replit.
Your Replit account can now connect to your GitHub.
Step 1.
Click on Create Repl on the left sidebar (Remember: You won't be creating a new project, but importing code from GitHub). Click on Import from GitHub.
Step 2.
Click on Connect your GitHub account and choose which account (if you have multiple GitHub accounts connected) to install and authorise Replit.
Click on Install & Authorize to view available repositories to import.Â
Step 3.
Choose the repository you wish to import into Replit and click Import from GitHub.
Once you have authorised GitHub, you will have access to all your public GitHub repositories and can import them.
Step 1.
Open the Replit project you wish to create a GitHub repository for. Under Tools (often found on the left side bar below the files), Click on Git.
Step 2.
A tab called Git will open. Click on Initialize Git repository to create a repository in the Replit server.
You may tick Create initial commit with all changes if you wish to save your current code into the repository.
Step 3.
Click the gear icon to open the Git settings. Click on Create Repository on GitHub once you have filled in the repository name and a short description.
Makre sure that the Privacy setting is set to Public so your markers can access the repository.
Step 4.
Go back to your commits (by clicking on back button if you are in Settings), then click on the Push branch as 'origin/main'.
Step 5.
Go back to your commits (by clicking on back button if you are in Settings), then click on the Push branch as 'origin/main'.
When you see Remote Updates, it means your first git push was successful. Every time you wish to push or pull code changes, you just need to click Sync with Remote.
Make sure to write meaningful commit messages.