-
-
Notifications
You must be signed in to change notification settings - Fork 927
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Best practices to switch from master to main #761
Comments
I just taught the git lessons today, and indeed, when you create the github repo, it now defaults to |
For the latest version of git, from what I've seen you still need to configure your default branch to be I taught git last week and honestly I installed git with xcode on this computer and didn't want to try to figure out how to update before the lesson. So instead, I did
Then your branch is named This also was a bit more relevant for me because I teach a custom version that teaches branches and PRs so we need to talk about branches anyway. I still presented it as a setup step and explained that master is a historical reference to slavery and as a community we are moving to the default branch being called |
If you do forget to change your branch names and this should reduce the git-mastrics of creating and deleting branches in separate steps (which tbh is what I normally do) reference: https://stackoverflow.com/questions/6591213/how-do-i-rename-a-local-git-branch |
FWIW, the new version of the git installer for windows now gives the users an option to explictly switch their default branch to 'main': carpentries/workshop-template#711 |
Should we add a step to change the branch to |
Seconding @sstevens2's suggestion to add these instructions to the config step. |
In addition to adding instructions for changing the branch from
|
As of now, the binary version for Mac from the Git website is only on 2.27.0, and the version from Apple via xcode install is 2.24.3 (on my machine anyway). It might be good to include additional changes to check the initial branch when creating a new repo as part of the lesson, so that instructors are not left dealing with different branch names across installs and versions. (I don't think asking mac users to install via homebrew or source is a good idea.) |
As of yesterday, the mac binary has been built for version 2.31.0: https://git-scm.com/download/mac, so these features will now be default for new installations. |
Hello All, The latest pc windows version of git bash (2.31) allows the user to choose their own default branch name on install. Previous versions default to "master". This resulted in a class where some people had master and a few had main in their git repositories and there is a possibility that someone will have some other name in the future. We hadn't taken the time to do the following: |
from issue swcarpentry#761
Implemented in e06701b |
As Github is switching its terminology from master to main (https://github.com/github/renaming) over the next several months, I'm curious what the Carpentries approach will be. In this lesson, there are several episodes (7, 8, 9 on quick glance) that would require quick changes from "master" to "main." Is this a current consideration?
The text was updated successfully, but these errors were encountered: