|
|
Subscribe / Log in / New account

master/main change

master/main change

Posted Oct 21, 2025 16:04 UTC (Tue) by NYKevin (subscriber, #129325)
In reply to: master/main change by jhe
Parent article: Git considers SHA-256, Rust, LLMs, and more

Usually you can just git switch main and it will figure itself out (--guess is on by default).

If you have more than one remote, you can (I think) write something like git switch -t origin/main. If you have local changes, you'll have to decide what to do with them, and there are flags for that (see git-switch(1)).


to post comments

master/main change

Posted Oct 21, 2025 16:24 UTC (Tue) by jhe (subscriber, #164815) [Link] (1 responses)

Thats what im doing (nano'ing the HEAD because git switch refuses to work in a bare repository) with the 1500 git mirrors. Whack-a-mole but on payroll.

master/main change

Posted Oct 21, 2025 17:11 UTC (Tue) by NYKevin (subscriber, #129325) [Link]

Don't do that. Use [1] and write a five-line bash script instead. It will save you so much time over manually nano'ing individual HEAD files one at a time.

[1]: https://git-scm.com/docs/git-symbolic-ref


Copyright © 2025, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds