Add [remote "origin"] when cloning from github

Hi,

When cloning from github, the .git/config file is not similar as the one we get when we “git clone” in a console. Is it possible to automatically add the section:

[remote "origin"]
	url = https://github.com/sebsheep/aws-server
	fetch = +refs/heads/*:refs/remotes/origin/*

to be able to “git push origin my_branch”?

Hey there,
To add a remote to the Git repository:
Run this command: git remote add <remote-name> <url> in your console.

To remove a remote:
Run this command: git remote rm <remote-name>

Yeah thanks, but I know the commands to add this manually. I would like this had been added automatically.

Of course, they won’t load the .git/config, since GitHub doesn’t upload the .git folder whilst cloning, thus you have to git init first.

Hey @sebsheep I gather you’re importing a GitHub repo and that’s where you’d like to see this option? If you want to create a permanent link between your GitHub repo and your project I’d suggest using the Clone from Repo option under the New Project menu selection instead of using Import from GitHub. The clone starter is intended to work like a git clone whereas the Import feature is intended to bring the content of the repo into Glitch but doesn’t make the Glitch project a clone of the repo.

Happy Glitching!

1 Like

thank you for the answer @cori

1 Like