开发者

Where is [git pull] pulling from?

开发者 https://www.devze.com 2023-03-28 19:49 出处:网络
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? Usuall

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.


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号