Git development
 help / color / mirror / Atom feed
From: "Bence Ferdinandy" <bence@ferdinandy.com>
To: "Caleb Cushing" <xenoterracide@gmail.com>
Cc: "Jeff King" <peff@peff.net>, <git@vger.kernel.org>
Subject: Re: git remote set-head automatically
Date: Sun, 12 Jan 2025 09:19:39 +0100	[thread overview]
Message-ID: <D6ZY4MU53E2I.3LWESUZX6TR5A@ferdinandy.com> (raw)
In-Reply-To: <CAAHKNRF8JDUTH-QzPG1b4-wafzU+MXaMNinfBRu3JfCssfwGUw@mail.gmail.com>


On Tue Nov 19, 2024 at 16:40, Caleb Cushing <xenoterracide@gmail.com> 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

      parent reply	other threads:[~2025-01-12  8:25 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-15 14:34 git remote set-head automatically Caleb Cushing
2024-11-16  3:36 ` Jeff King
2024-11-16 15:01   ` Bence Ferdinandy
2024-11-19 15:40     ` Caleb Cushing
2024-11-19 17:06       ` Caleb Cushing
2024-11-19 18:44         ` Jeff King
2024-11-20  1:10       ` Junio C Hamano
2024-11-20  1:17       ` Junio C Hamano
2024-11-20  8:58         ` Bence Ferdinandy
2025-01-12  8:19       ` Bence Ferdinandy [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=D6ZY4MU53E2I.3LWESUZX6TR5A@ferdinandy.com \
    --to=bence@ferdinandy.com \
    --cc=git@vger.kernel.org \
    --cc=peff@peff.net \
    --cc=xenoterracide@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox