I hate git and I'm bad at it. I have a question.

I have a repo with two remotes, RA and RB. Both are on BitBucket. Both remotes use git-lfs. On BitBucket, each repo has its own unique git-lfs endpoint associated with it.

I wish to check out branch bb, which is in repo RB. I say `git fetch RB bb`. Then I say `git checkout -b bb --track RB/bb`. It fails with "Object does not exist on the server: [404]" during lfs smudge. It prints the hash, and I can confirm, yup, that hash is in the server.

What I believe is that git lfs is confused about the fact RA and RB have their own git-lfs servers associated with them. I believe it is asking RA's git-lfs server for a hash from RB's git-lfs server, and not finding it, because it's asking the wrong server.

How could I:

1. Determine whether this is happening? The git checkout smudge doesn't print what server it's fetching from. It just says "the server".

2. How do I make it do the right thing?

@mcc

You might wish to set `lfs.remote.searchall` git config element to true. I've learned that by finding github.com/git-lfs/git-lfs/blo

@robryk Okay I don't understand this but it sounds *very* useful, thank you, I'll come back and think about it hard later

Follow

@mcc

Actually, manpages.debian.org/testing/gi describes a bit more of how lfs finds the correct remote. It seems to be settable per branch, but I don't get how the default heuristics work.

Sign in to participate in the conversation
Qoto Mastodon

QOTO: Question Others to Teach Ourselves
An inclusive, Academic Freedom, instance
All cultures welcome.
Hate speech and harassment strictly forbidden.