hsalimi hsalimi - 2 months ago 13
Git Question

Is it possible to config a remote git repository directly from command line?

I wonder is there any method to change the configuration of a remote git repository without having a local clone? I prefer to pass the repo url into

git config
, but it seems that it does not work. Any ideas?

Answer

Git will only allows you to configure your repo if you work in a local clone. So you can't do this directly in a remote repo. In addition, you can also set a remote repo for your project with:

git remote add origin https://yourRepoUrl

But this is only for push and fetch operations, not for config.