I noticed that Glitch only seems to import the master branch of my github project, with no option to import the specific branch I am working on and need feedback on. Is there way to import just the code for a specific branch? Sounds like others have asked about this issue before, but I see that was raised last year.
each project has its own git repository (if you just created your project, give it around 10 minutes for it to be created). So if you access the Terminal (Project menu -> Advanced Options -> Terminal) you can add the github project as a remote and then pull the branch you prefer If you need further guidance let me know!
You would have to use git commands in the console to do that. You can’t do it right now with the GH import function.
Right now, GH import just pulls the code from GH, not the history of the repository, so you don’t have any branches locally, and the remote hasn’t been set up to point to GH. The best way to do this right now would be to delete your app directory, and clone from GH into that directory.
cd / rm -rf /app git clone https:/github.com/<some-project> app cd app git checkout <some branch>
This will delete whatever is in your project, so make sure there’s nothing you care about in there.
It just occurred to me that you can’t completely remove the app directory. Instead, do this:
rm -rf /app/* rm -rf /app/.*
git clone https://[insert username]:[insert password]@github.com/[insert organisation name]/[insert repo name].git
thank you @Gareth , I did a bit different but same; idea: instead of https://username:email@example.com/username/repository.git just https://github.com/username/repository.git and, the console asked for the credentials.
So now it works! thanks! I did like this:
rm -rf /app/* git clone https::github.com/username/repository.git app cd app git checkout the-branch