Yogeshwer Sharma
Yogeshwer Sharma

Reputation: 3837

Where is [git pull] pulling from?

I am on branch tm-skeleton and executing git pull does something (technically, it asks for password and I hit <ctrl-c> there), but how do I know where is it pulling from? Usually, [branch "tm-skeleton"] section in .git/config file explains all this (remote variable to be precise), but there is no such section for this branch in my config file.

Upvotes: 3

Views: 144

Answers (1)

manojlds
manojlds

Reputation: 301047

Have you read the git-pull manual under Default Behaviour? To quote a section:

Often people use git pull without giving any parameter. Traditionally, this has been equivalent to saying git pull origin. However, when configuration branch.<name>.remote is present while on branch , that value is used instead of origin.

In order to determine what URL to use to fetch from, the value of the configuration remote.<origin>.url is consulted and if there is not any such variable, the value on URL: line in$GIT_DIR/remotes/<origin> file is used.

Upvotes: 4

Related Questions