I want to ask if it’d be possible to edit projects directly from somewhere else with git and see results immediately. I’ve never used git, but I saw somebody talking about how this could be possible. I do like the glitch IDE and all, but sometimes I need stuff in VScode like prettier and other tools. I don’t know where to start when researching about this so I’m asking here. Is it possible, and if so how? Maybe could you link some resources where I can learn how?
a more seamless integration of the glitch editor and local desktop tools is something we would like to enable in the future.
Right now though you can kind of get this working by
- export your project to github,
- clone the project repo locally and edit it in VScode
- push to github, make sure master is updated with your new code
- from glitch, import the repo again. This will replace the glitch version with the code from the github version
- you can repeat this flow as needed
hope that helps
The solution you present is straight forward and very usable, thanks!
Can’t help but say that it would be very pleasant to develop with this flow.
Something such as https://www.netlifycms.org, with which commits made through the web UI (and saved through git); commits are attributed to the git(hub/lab/bucket) user, as they would be from the command line.
One more reason to add in favor of Git(hub/lab) integration, are the triggers offered by CI pipeline tools, offered when hosting a repo.
This may be offtopic, but how would I
clone the project repo locally and
push to github?
For cloning the Glitch repo locally, try
git clone https://api.glitch.com/your-project/git
as in the URL
For pushing to Github with the Command Line Interface (CLI)
Change the current working directory to the newly downloaded git repository folder:
git remote add github email@example.com/your-user/your-project.git to add a new git remote (a place where your repository is hosted, Glitch and now Github).
github by the name you would like the remote to have, and
your-project by the correct values. See for more details https://help.github.com/articles/adding-a-remote/
Of course for this step you will have had to first create a new git repository on your Github account.
Following this use your normal git workflow, with comits, push/pull, branches …
Does this help?