DEV Community

Fernando B πŸš€
Fernando B πŸš€

Posted on β€’ Edited on

3 1

I've changed default branch from Master to Main

I've made a small change to my git configuration, which anyone should be able to do today. I've updated my git to the latest 2.28. I think is a good step for my workflow, as seeing and repeating master on conference calls was a bit aggravating for me.

On Windows:

git update-git-for-windows
Enter fullscreen mode Exit fullscreen mode

Run through the prompts.

On Ubuntu:

Canonical repos might not be up to date, so you will need a ppa repo fortunately there is one for git:

sudo add-apt-repository ppa:git-core/ppa
sudo apt update
sudo apt install git -y
Enter fullscreen mode Exit fullscreen mode

On Mac:

brew ugprade git
Enter fullscreen mode Exit fullscreen mode

I no longer have a mac, so can't confirm this is the latest.

Check version, and update your default branch name. Mine is main, but yours can be something else like latest, production, etc.

git --version
git config --global init.defaultBranch main
Enter fullscreen mode Exit fullscreen mode

Image of Datadog

Create and maintain end-to-end frontend tests

Learn best practices on creating frontend tests, testing on-premise apps, integrating tests into your CI/CD pipeline, and using Datadog’s testing tunnel.

Download The Guide

Top comments (1)

Collapse
 
toiinnn profile image
Antonio Marcos Oliveira β€’

Thanks! I just updated in my pc here, and I think it's a good change switch from master to main. :D

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs

πŸ‘‹ Kindness is contagious

Please leave a ❀️ or a friendly comment on this post if you found it helpful!

Okay