![]() Git symbolic-ref refs/remotes/origin/HEAD refs/remotes/origin/master Now, what if someone had a clone of that repo before you fixed it, give them this: git checkout main The -m or -move parameter move will preserve your reflog, meaning that your history is preserved and you can delete that ridiculous main branch. In that case, you can use the move command below: git branch -m main master Maybe you didn’t want to look into the git client changes and didn’t want to risk messing your repository. However, you may be working on something and not have had time to fix your branch naming. You can set the name of the default branch with the command below: git config -global faultBranch master But, since you are here, I guess you are not this person and are worthy of learning from this post.įirst, new project creation. If you use that to coerce others’ way of working, you are not interested in software development. If you feel some sort of racial distress about slavery you never experienced. Something feeling threatened by a branch named master may not be the most productive colleague you can get. However, I think gatekeeping can be a good thing. People say we should not gatekeep things, especially around comic books and software development. However, if you want to revert to the old ways, you are in luck. You know, because everything gotta be woke now. Now you will also have a way to easily rename your Git default branch from main to master.ĭid you surprisingly start a new project with no master branch? Did you find in its righteous place the overzealous main branch? Or maybe you realised that since Git developers introduced the ability to change the default branch in the 2.28 release and the coding wokelords ran with it. Well, among other things but I have more words on that. By inspiration I mean I copied the commands from Scott’s post and flipped words since this is what this is about. I took some inspiration from that today after noticing a bunch of code hosting services like Gitlab and Github zealously decided to name default branches for new projects main.
0 Comments
Leave a Reply. |