Thread (7 messages) 7 messages, 3 authors, 2025-01-12

Re: git remote set-head automatically

From: Bence Ferdinandy <hidden>
Date: 2025-01-12 08:25:12

On Tue Nov 19, 2024 at 16:40, Caleb Cushing [off-list ref] wrote:
sounds great. I think I realized why I didn't have it. It's not done
by `git remote add <origin> https://...`  my experiment was `git
remote rm origin` and then `git remote add origin ... ; git fetch
--all --prune` I think I also tried without the prune option. git
version 2.46.1

What I want mostly is for that HEAD ref to always exist. As far as
there being ways to configure it, that's all good but I don't want to
explain doing that to consumers of my code. I'd rather it just work
for them, on clones, and add remotes or fetch if it's missing.

I'm not super worried about it being updated as I feel like if that
ever happens it's something loudly communicated, and I'm more willing
to find it ok to make that an FAQ, if this breaks because that changed
you can manually update that. Mostly I'm of the opinion that what I'm
doing needs to work in various CI environments out of the box.

Thanks for the info, hopefully soon (tm).
It's in the new release now, it also got some configuration options, but the
default should be what you want

https://git-scm.com/docs/git-config#Documentation/git-config.txt-remoteltnamegtfollowRemoteHEAD

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