Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the difference of main and master branch? [duplicate]

I am currently learning git and github. So, I made a new repository for my e-commerce project. As I found that I can commmit and sync changes using the vscode and I made commits and synced the changes from there. But If I did from there I says I am working on main branch.

I want to know the difference of the main and master branch in github. Do we miss some features in main branch that is in master branch?

like image 350
Santosh Phaiju Avatar asked Dec 09 '25 01:12

Santosh Phaiju


1 Answers

There is no functional difference in and of itself. Any difference for your workflow stems from the way you use and design your repo.

The git documentation states in the options for git init (i.e. creating a new repo):

--initial-branch=

Use the specified name for the initial branch in the newly created repository. If not specified, fall back to the default name (currently master, but this is subject to change in the future; the name can be customized via the init.defaultBranch configuration variable).

(Emphasis mine)

like image 77
leuchtstoffratte Avatar answered Dec 10 '25 17:12

leuchtstoffratte



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!