Blog Post

A New Git Default Branch

,

I learned a new trick from Andrew Pruski. In a blog on avoiding PowerPoint, he had htis neat trick:

git config --global init.defaultBranch main

Apparently, this is a new setting in git v2.28. This allows you to set a default branch for all new repos. Since I often create a local repo first before pushing to a remote, this is handy for me.

This was on the git blog, if you want to know more.

Original post (opens in new tab)
View comments in original post (opens in new tab)

Rate

5 (1)

You rated this post out of 5. Change rating

Share

Share

Rate

5 (1)

You rated this post out of 5. Change rating