Skip to contents

Create a new "feature" branch from the current or default branch of the project git repository using gert::git_branch_create() and bump 'dev' version to 9000 with desc::desc_bump_version().


new_branch(name, bump_ver = TRUE, current = FALSE)



name of the new branch.


if TRUE, bump 'dev' version to 9000, see details.


create new branch from the currently active branch (TRUE) or from the default branch (FALSE), see details.


The new branch will be created and checked out if it does not exist on local or remote. If the version in DESCRIPTION has 3 components (a release version) and bump_ver is TRUE (the default), the fourth component, 'dev' will be bumped to 9000 and checked in to the new branch.

If the version already has 4 components, it is not changed.

If current = FALSE (the default), the new branch will be created from the default branch as determined by usethis::git_default_branch().