Hunsu
Hunsu

Reputation: 3401

what is the purpose of git remote origin variable in .gitconfig file

I have this below in my .gitconfig file:

[remote "origin"]
   url = https://github.com/eldur/jwbf

Now when I do:

git clone https://github.com/google/skicka.git

git clone the https://github.com/eldur/jwbf project to skicka folder. Is it normal?

Upvotes: 0

Views: 1905

Answers (1)

VonC
VonC

Reputation: 1329562

First, remove any remote entry from your global config file

git config --global --unset-all remote.origin

Then clone your repo as usual (your second clone won't get the first repo!), and check your local config:

cd /path/to/local/second/cloned/repo
git config --local

You should see a remote.origin value which will match the repo you just cloned.

Upvotes: 1

Related Questions