Git: What goes behind the scene
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.
精彩评论