DEV Community

Jesse Houwing
Jesse Houwing

Posted on • Originally published at jessehouwing.net on

Rename your master branch in Azure Repos

Rename your master branch in Azure Repos

Renaming your master branch in Azure Repos could be as simple as a few clicks. But if you have complex policies or permissions in place, it may be a little more work.

To rename your master branch you have to create a new branch and then delete the old one:

1- Use the context menu to create a new + new branch from master.

Rename your master branch in Azure Repos

2- Chose a better name for your branch. main will do:

Rename your master branch in Azure Repos

3- Set the new main branch as your new default branch:

Rename your master branch in Azure Repos

4- And finally, delete your old master branch.

Rename your master branch in Azure Repos

If you're also using Azure Pipelines (which you should if you're also using Azure Repos), you may need to fix a few other things as well, they're essentially the same as the ones you'll need to fix when using Azure Pipelines together with GitHub.

Top comments (7)

Collapse
 
ighallas profile image
ghallas • Edited

master (n.)
late Old English mægester "a man having control or authority over a place; a teacher or tutor of children," from Latin magister (n.) "chief, head, director, teacher"

Sorry, but imo this is starting to get somewhere between ridiculous and Orwellian. Even if the origin of the term in informatics does come from slave/master, we will abolish the word?? (let's do away with "abolish" to, it does relate strongly to slavery too, doesn't it?). So, every word that has been used in a deplorable (oops, here's another potential one) context will be thrown out the window? What about unix kill? Let's try "rip -9" instead. What about male/female VGA connectors? Surely potentially toxic. Let's use Yin and Yang instead.

I really wonder who is offended by this. I have the obvious suspicions, and very strong objections. To me, regarding any group as "people potentially offended by past offences" is in its very essence discriminatory. Potentially patronizing. Like seeing burdens of the past in people I should just see as who they are. Really, I don't know. I am Greek. We have a rather recent history of 4 centuries of oppression and widespread slavery. Do I this this offensive? No, I don't.
Honestly, I would like to hear from people that do find this offensive, and then poll in the greater group they represent, and hear what that group's majority has to say about this.

I strongly believe in equal rights, equal opportunities and respect of the dignity of everybody. I really feel that such initiatives (renaming master) offer precisely zero to solving the problems of people deprived of the above. Even worse, they underplay the significance of the very issues they are supposed to address, relegating the response to harmless, costless, symbolic gestures.

There is slavery in the world. Even today. Want to do something about this? Expose companies that are using employees in conditions of slavery in all but name. Stop buying their stuff. Hack porn sites. Do something real.

Sorry for the long read, and even more sorry if somebody feels I am offending her/his sensitivities. But, for some reason, the absurdity of this hit a nerve.

I am keeping my master branch.

Collapse
 
stefanomontani profile image
stefanomontani • Edited

I really like your thinking. It is applicable even to other matters where the politically correctness, which in most cases is a form of hypocrisy, is doing damage. Though, we cannot undervalue the power of the "logos": the language is the think, talk is action. I'm italian. In Italy we would have never called "kill" the action to stop a process. And this difference has a solid meaning: a little difference which reflects the big differences between the italian culture and certain others: high level free medical assitance for everybody, no one can bring weapons if not for the strongest reasons, no mass exterminations in schools, ... (obviously, this does not means that there is no violence in our society). The point is that a man who can think the violence can act the violence, has lower barriers to act the violence already present in his thinking, in his imagination. Improving the language is improving the think.

Collapse
 
ighallas profile image
ghallas

Thanks for your thoughts Stefano!

I see your point, but I think that the case where reality alters the meaning is preferable to the one where the meaning tries to alter reality.

Think for example "sir". It used be reserved for feudal lords, as opposed to commoners on non-freemen. I am thinking that it was probably a that caused resentment among the lower classes. Most countries have done away with that social system as they moved to democracy and now "sir" is what any stranger that doesn't know your name could call you out of courtesy.

People could have made a move to banish the word once chivalric orders and feudal titles were abolished in each country, but that would thieve us of a word that found its new place in the world.

Collapse
 
stevetaylor profile image
Steve Taylor • Edited

Master has many meanings, almost all of them not related to slavery. The focus should be on eliminating “slave” as a metaphor in tech. In Git, the usage of “master” is more related to the concept of a master copy. I can definitely get behind removing “master” where it is actually used as a slavery metaphor.

Collapse
 
jessehouwing profile image
Jesse Houwing • Edited

It's not 100% clear where the name master came from in Git. It likely came from BitKeeper, the source control system it replaced. Their docs talk about master and slave repositories. BitKeeper doesn't have a special concept for branches, it just sees them as another repo.

In the end it's often not what is meant by a name, it's how it's being interpreted. And many people use (correct or incorrect) the terms master and slave for forked repositories and for the main branch vs other branches.

We have good alternatives. There is no need to switch immediately. GitHub won't ban the usage of the term. But I do expect to see a change in defaults. There are many terms we could use instead to describe a similar relation between branches and repositories that do not have a possible negative connotation.

Collapse
 
brogrammerben profile image
Ben

I mean, naming can be anything but main isn’t ideal because branches should be named to their purpose IMO. So I would change master to production or some flavor of that since that is the purpose of that branch anyway. Then it becomes merging feature branch into production branch triggers CI/CD and production branch gets built and installed to production. Similarly, you can have a develop branch that triggers CI/CD to a dev environment. Just my $0.02

Collapse
 
jessehouwing profile image
Jesse Houwing

Then call it production if that works for you. It sounds like a more natural name from how you continued your reply...

The term main or mainline has been used in Source Control way before the introduction of master, it's when one or more parts arrive at the main conveyor belt in industrial assembly. It's where all the changes get merged into on their way out the door. main ain't bad. But in your environment there may be a better term.

Similarly the term trunk is used. from the 'inverted tree' picture where all branches at some point came from the trunk and where any branch can try to become the new top branch in the tree. Though merges between branches (though possible) are a long and very tedious process in actual biology.