If you are familiar with git commands, you can use the process described below to push code that you have created outside of Glitch into your project.
Step One: Get your git URL
First, you will need to get the git URL for your project.
To do this:
- Open the Project Editor.
- Click on 'Tools', and then click the 'Import and Export' button.
- Now you should see Your project’s Git URL. You can click the 'copy’ button to save this URL to your clipboard.
Next, run this command in the Glitch project terminal to ensure you can push to the active branch directly. You only need to do this once and your project will remember this setting for all future changes:
git config receive.denyCurrentBranch updateInstead
Step Two: Clone your project locally
You can use your computer’s command line tools to access your project from outside of Glitch. Here is the command - be sure to paste in your git URL:
git clone <paste your git URL here>
Step Three: Make your changes and push to Glitch
<make code changes and commit>
Step Four: View your changes in the Project Editor
Go to your project on Glitch. If the editor was already open when you pushed to your project, then in order to see them, you will need to run refresh in the project terminal, or reload the editor.
Boom! The code you created locally is now in your Glitch project, and you’ll be able to see your commit(s) in the Rewind view.