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 Import / Export.
- Now, you should see your project’s git URL. You can click Copy 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 tool 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 commits in the Rewind view.