You are using an unsupported browser. Please update your browser to the latest version on or before July 31, 2020.
Home > Project Editor > Importing & Exporting Code > Pushing Local Code to a Project
Pushing Local Code to a Project
print icon

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.


Here’s how:


Step One: Get your git URL

First, you will need to get the git URL for your project.


To do this:

  1. Open the project editor.
  2. Click on Tools, and then click Import / Export.
  3. 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>

git push


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.

Got more questions? Check out our Community Forum!
Open 24/7, the forum is where Glitch makers help each other and show off all the rad apps that they have created. It's the friendliest community of coders on the Web!
6 out of 8 found this helpful

scroll to top icon