understanding how remote tracking works

7 messages, 4 authors, 2016-06-15 · open the first message on its own page

understanding how remote tracking works

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

Re: understanding how remote tracking works

From: Ralf Ebert <hidden>
Date: 2016-06-15 22:49:16

Hi Geoff,
Why does "git show-ref" show me far more than in
in .git/refs/remotes/origin?
probably the other refs come from .git/packed-refs . See 
http://www.kernel.org/pub/software/scm/git/docs/git-pack-refs.html .

Greetings,
Ralf

[PATCH/RFC] Documentation: add a FILES section for show-ref

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(-)
diff --git a/Documentation/git-show-ref.txt b/Documentation/git-show-ref.txt
index 3f9d9c6..3fe961d 100644
--- a/Documentation/git-show-ref.txt
+++ b/Documentation/git-show-ref.txt
@@ -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
 -------
-- 
1.7.2.1.544.ga752d.dirty

Re: understanding how remote tracking works

From: Geoff Russell <hidden>
Date: 2016-06-15 22:49:16

Hi Ralf,

On Mon, Aug 9, 2010 at 11:01 AM, Ralf Ebert [off-list ref] wrote:
Hi Geoff,
quoted
Why does "git show-ref" show me far more than in
in .git/refs/remotes/origin?
probably the other refs come from .git/packed-refs . See
http://www.kernel.org/pub/software/scm/git/docs/git-pack-refs.html .
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

Re: understanding how remote tracking works

From: Michael Witten <hidden>
Date: 2016-06-15 22:49:16

On Sun, Aug 8, 2010 at 20:53, Geoff Russell [off-list ref] wrote:
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.

Re: understanding how remote tracking works

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?

Re: understanding how remote tracking works

From: Geoff Russell <hidden>
Date: 2016-06-15 22:49:16

On Mon, Aug 9, 2010 at 11:49 AM, Jonathan Nieder [off-list ref] wrote:
Michael Witten wrote:
quoted
On Sun, Aug 8, 2010 at 20:53, Geoff Russell [off-list ref] wrote:
quoted
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 often find the low-level commands easier to understand ... and they
don't change as often.

Geoff
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help