DEV Community

Discussion on: Replacing master in git

daniero profile image
Daniel Rødskog • Edited

That way, it's clear that this branch has production-ready code

What if it's not code that I'm keeping in my repo? For example I kept my master principal thesis in git. At that time, still in school, I felt no connection to the word prod at all. I think the premise for this discussion is absurd, but if I had to pick a new word, it would have to be as generic as possible. I think main works well.

goodevilgenius profile image
Dan Jones

"As generic as possible" would probably be "default", because that's all it is. It's the default branch.

It might be for production code. It might be for in-development code. It might be for documentation. It might be for something completely different.

Folks using git should choose a name for their first branch that accurately reflects what the branch is being used for. That way it's not ambiguous.

And if you're using it just for yourself, and not using it for collaboration, so it doesn't matter what you call it, call it whatever you want. It doesn't affect anybody else. It only has to have meaning to you.

shaunagordon profile image
Shauna Gordon

What if it's not code that I'm keeping in my repo?

While "production" may not be a 100% accurate word (and is why different people have different ideas for the default name), the concept is still the same -- that's the rendition that's going to ultimately go to the final audience (be it client computers or bookshelves).

Weirdly enough, all of this disagreement could be solved by making the default branch name a config option...

Some comments have been hidden by the post's author - find out more