From: Geoff Russell <hidden> Date: 2016-06-15 22:49:16
I'm trying to get my head around tracking/remote repositories.
Why does "git show-ref" show me far more than in
in .git/refs/remotes/origin?
$ ls -l .git/refs/remotes/origin
total 12
-rw-r--r-- 1 geoff ssh 41 2010-08-09 10:17 BBBB
-rw-r--r-- 1 geoff ssh 41 2010-08-09 10:27 CCCC
-rw-r--r-- 1 geoff ssh 32 2010-08-09 10:13 HEAD
$ git show-ref
...
21ff181dc71a2fb0ef161b3f55f93b8197312515 refs/remotes/origin/BBBB
d2e8aa93940f42c4017f0029d94b9e0ead1d392d refs/remotes/origin/BRANCH
e8ee2fb060589114d8fd5cf1d5c568365f2b3dbb refs/remotes/origin/CCCC
979133b0762ed7b4b8b6e0ef0387a2a11e89c8ba refs/remotes/origin/HEAD
2b568d757d92e8fd581a90888dc8b0bc95355565 refs/remotes/origin/LCG
fe91bc2a45753830b832a9ccf24fdea5d7b73b4c refs/remotes/origin/SWAN
83f9795420b54eb23327ec33d1907757ba8141cc refs/remotes/origin/brA
2a0ea3f9823db8fb9f74171e38531f5be3cd66a5 refs/remotes/origin/brB
979133b0762ed7b4b8b6e0ef0387a2a11e89c8ba refs/remotes/origin/master
85bffc07ee7f3b07717c4ed74e0a6a56e52a48e4 refs/remotes/origin/mmmm
e02730027b1b85d515bce08c17010408610061f4 refs/remotes/origin/nnnn
Cheers,
Geoff Russell
P.S. my git is at 1.6.2.3
From: Jonathan Nieder <hidden> Date: 2016-06-15 22:49:16
A peek at where the refs are kept might help understanding, even if,
as the DESCRIPTION section suggests, direct access is not part of the
public API.
Balance that out with a pointer to update-ref.
Suggested-by: Geoff Russell <redacted>
Signed-off-by: Jonathan Nieder <redacted>
---
Documentation/git-show-ref.txt | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
@@ -163,9 +163,15 @@ flag, so you can do to get a listing of all tags together with what they dereference.+FILES+-----+`.git/refs/*`, `.git/packed-refs`+ SEE ALSO ---------linkgit:git-ls-remote[1]+linkgit:git-ls-remote[1],+linkgit:git-update-ref[1],+linkgit:gitrepository-layout[5] AUTHORS -------
Yes. Many thanks. I'm working my way through Jon Loeliger's Git book and it's
confusing when the actual behaviour differs from that in the book :)
Cheers,
Geoff
From: Jonathan Nieder <hidden> Date: 2016-06-15 22:49:16
Michael Witten wrote:
On Sun, Aug 8, 2010 at 20:53, Geoff Russell [off-list ref] wrote:
quoted
I'm working my way through Jon Loeliger's Git book and it's
confusing when the actual behaviour differs from that in the book
This probably results from the git culture's conflation (or should I
say confusion?) of low-level and high-level representations and
commands.
I guess I’ll bite. What does that mean? We have “show-ref” and
“update-ref” precisely as low-level commands that are independent
of representation.
Probably the more relevant question: what do you want to do about it?