8/17/2023 0 Comments Git rename branch mainRemoving this language from company vernacular is a small way to help make technology more accessible and inclusive to Black people. The origin of the term "master" in computing is controversial, but email records from the Git developers confirm that they were referring to the common master/slave metaphor when the industry standard was set. The main argument for changing "master" to "main" is to reduce the occurrences of problematic terminology in a team's codebase. Many names have been suggested, like "primary" and "default", but "main" has so far emerged as the most popular alternative. In the vein of making technology a more inclusive place, one initiative has been to rename the master branch to a different name. The name "master" is significant because it has been both the standard name for the default git development branch but also carries clear references to slavery (e.g. The current discussion has been around naming terminology in software development and how to make it more inclusive to the Black community. This move is one that we've adopted at Kapwing, and in this article, we'll discuss some of the thinking that went into this change as well as a short tutorial on how to do it yourself! What is the current discussion about? One recent movement in the tech industry has been around changing the default "master" name to another name like "main". If you want to learn about how to rename a remote branch too, I wrote an article on it as well.If you're a software developer in 2020, you're likely familiar with the term "master" as the name of the primary branch of development in Git. Even if it’s not the current branch, you’ve also learned about the command to use in that case. This article showed you how you can rename a local Git branch, especially if it’s the current branch. To confirm that, you can run git branch again: You can see the name of the branch has been successfully changed to bug fixes. m in this situation is a flag that stands for move. Remember I pointed out that I want to rename the fix bug branch to bug-fixes, so I’ll run git branch -m bug-fixes. To rename the branch, you need to run the command git branch -m new-name. You can see that git bash shows me the branch I’m currently in now, which is fix bug. In this case, I want to change the fix-bug branch to bug-fixes. You can do that by running git checkout branch-name. Next, make sure you are in the branch you want to change the name of. The first thing you need to do is to run git branch so you can see the branches you have in place: Proceed to the next section of this article to see how you can rename the current branch in Git. To rename a branch you are not currently working in, you usually run the command git branch -m old-name new-name.įor example, I’m currently on the main branch and I was able to rename kolade-works to kolade-codes. In this article, I will show you how to rename the branch you’re working with without switching to another branch. Since you have those branches in place, you might want to rename any of them if you find a typo, for example, or change the code's purpose. If you are using Git for version control, it’s likely you’ve created branches for various reasons.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |