Branch Names
This lesson is called Branch Names, part of the Using Git and GitHub with R course. This lesson is called Branch Names, part of the Using Git and GitHub with R course.
Transcript
Click on the transcript to go to that point in the video. Please note that transcripts are auto generated and may contain minor inaccuracies.
Your Turn
Working in the local-first project:
Load the
usethis
package (install it if necessary)Check the name of your default branch using
git_default_branch()
If your default branch is called
master
, switch tomain
usinggit_default_branch_rename()
andgit_default_branch_rediscover()
Set up your system to use
main
as the default branch in the future usinggit_default_branch_configure()
Learn More
If you're interested in learning more about why GitHub decided to switch the default from master to main, this article gives a nice overview. You might also check out this statement from the Software Freedom Conservancy on the switch.
Much of what I showed above comes from this article on the tidyverse blog about renaming the default branch.
Have any questions? Put them below and we will help you out!
Course Content
26 Lessons
You need to be signed-in to comment on this post. Login.