开发者

Git: What goes behind the scene

开发者 https://www.devze.com 2023-03-25 05:23 出处:网络
I am trying to figure out which commands are executed when I give, for example, git pull or git fetch command. How the refs are resolved? If I give git fetch with two remote entries:

I am trying to figure out which commands are executed when I give, for example, git pull or git fetch command. How the refs are resolved? If I give git fetch with two remote entries:

[remote "origin"]
  fetch = +refs/heads/*:refs/remotes/origin/*
  url = ssh://a@b.c/path/to/git
[remote "origin2"]
  fetch = +refs/heads/*:refs/remotes/origin/*
  url = ssh://a@b.c/path2/to/git
[branch "mybranch"]
  remote = origin
  merge = refs/heads/mybranch

Are all remote-tracking branches from both remotes fetched? This I 开发者_运维问答can figure out by giving the command, but I want to be able to see what exact low-level commands are executed and how refs are resolved by git when I give a high level command.


See here. It's not very low-level commands description, but it will give you good overall understanding what is going on.

UPD: Also there's a similar question.

0

精彩评论

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