main branches locally
main branches locally
Posted Oct 21, 2025 19:18 UTC (Tue) by josh (subscriber, #17465)In reply to: master/main change by jhe
Parent article: Git considers SHA-256, Rust, LLMs, and more
So, in a local repository, I always want every new branch to start from origin/main, not main, and I never want main to point to anywhere other than origin/main. And in a remote fork, main is nothing but a stale mirror of some ancient version of the base repo, because I never push to it except by mistake (creating a pull request from my main branch because I forgot to make a local branch, which is a pain).
The only time I ever want a local main branch is for the rare project where I commit directly to main, such as private one-person repositories.
Posted Oct 21, 2025 21:15 UTC (Tue)
by iabervon (subscriber, #722)
[Link]
Posted Oct 21, 2025 21:22 UTC (Tue)
by myUser (subscriber, #58242)
[Link]
Why then not just delete it? Yes it is created after cloning, but you can then just get rid of it for good.
main branches locally
main branches locally