Giter VIP home page Giter VIP logo

branchmover's Introduction

branchMover

Change the default branch of your GitHub repositories, from inside RStudio.

Installation

You can install the development version of branchMover from GitHub with:

# install.packages("devtools")
devtools::install_github("gadenbuie/branchMover")

The app uses the usethis and gh packages. You need to configure gh with a Personal Access Token to be able to authenticate with the GitHub API. Read more about setting up a PAT in one of these places:

Then, in RStudio, run the app with:

branchMover::app()

If you’d like to explore or reconfigure the default branch of repositories that you manage in other organizations, provide app() with the user or organization name. Branch Mover will tell you how many repos you have access to in the organization and it won’t let you update branch names for repos where you don’t have admin permissions.

branchMover::app("rstudio-education")
#> ℹ @rstudio-education has 57 total repositories (including forks)
#> • 57 public repos
#> • 0 private repos
#> ℹ 57 non-fork repositories have the following default branches:
#> x master: 51 repos
#> ✓ main: 6 repos
#> ℹ You have admin rights on 1 repo

Notes

branchMover changes the default branch on GitHub and creates an issue announcing the change. If everything works, the issue is closed and instructions on how to update local copies of the repo are added to the issue.

Unfortunately, branchMover doesn’t update the default branch in your local copies of your repos. Thankfully, this is relatively pain-free with the usethis::git_default_branch_rediscover() function, added in usethis version 2.1.2.

The tidyverse article Renaming the default branch by Jenny Bryan provides a lot more detail about what’s going on behind the scenes.

branchmover's People

Contributors

gadenbuie avatar jennybc avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.