Re: [RFC/PATCH] Add fetch.updateHead option

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Nov 20, 2020 at 6:40 PM Jeff King <peff@xxxxxxxx> wrote:

> I don't think we do advertise the symref in such a case. In v2, the
> symref information is attached to individual lines in the ref
> advertisement. And we don't advertise the unborn line (we could, but I
> think we might need a special syntax for the oid field).

This may be worth considering changing.

If a hosting provider (e.g. GitHub) decides to configure an initial
branch (e.g. main) it would be nice for "git clone" to have
information about that initial branch so the user doesn't have to
change it manually to please the provider's aesthetics.

So the instructions could be:

  git clone $url .
  echo "# myproject" >> README.md
  git add README.md
  git commit -m "first commit"
  # git branch -M main # this step would not be necessary
  git push -u origin HEAD

Personally I don't care about this. But others might find it useful.

Cheers.

-- 
Felipe Contreras



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux