DEV Community

Cover image for Using git with Glitch
Paul
Paul

Posted on

7 2

Using git with Glitch

Glitch is a great place to host code samples for blogging and sketching out projects. My goal is to have a single source of truth for that code. Glitch has all the parts to do this with 1 gotcha.

Finding the Git url to clone the project.

The key here is each project is a git repository. Glitch pulls this code from the master branch on an interval to update the web project.

Either create a project or open an existing project in glitch.

Once open navigate to Tools -> Import and Export -> Your project's Git URL

Click the copy button.

Git URL in Glitch

Clone the repository on your computer and start committing!

Push to Master Workflow

After making some changes it's time to commit and push to master. Turns out Glitch doesn't allow this by default but it can be overridden via the Terminal inside Glitch with the following command.

git config receive.denyCurrentBranch updateInstead

Pushing will update and will change the output in a few minutes (non-scientific observation) but it doesn't sync up the IDE. For me this isn't a big deal as I would rather code locally.

To get the IDE in sync run the following command.

Resetting

Hope this helps someone!

Image of Timescale

🚀 pgai Vectorizer: SQLAlchemy and LiteLLM Make Vector Search Simple

We built pgai Vectorizer to simplify embedding management for AI applications—without needing a separate database or complex infrastructure. Since launch, developers have created over 3,000 vectorizers on Timescale Cloud, with many more self-hosted.

Read full post →

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more