0

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.

Yogeshwer Sharma
  • 3,647
  • 5
  • 25
  • 27

1 Answers1

2

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.

Community
  • 1
  • 1
Ivan Danilov
  • 14,287
  • 6
  • 48
  • 66