Skip to main content

Crate gcu

Crate gcu 

Source
Expand description

Switch, create, and derive Git branches (including from GitHub PR URLs).

ยงErrors

  • Git operations, GitHub API calls, or user interaction fails.

Functionsยง

ask_branching_from_not_default ๐Ÿ”’
Prints a styled notice that a new branch is being created from a non-default branch.
autocomplete_git_branches_and_switch ๐Ÿ”’
Interactive selection and switching of Git branches.
build_branch_name ๐Ÿ”’
Builds a sanitized, lowercased Git branch name from raw arguments.
create_branch_and_switch ๐Ÿ”’
Creates a new local branch (if desired) and switches to it.
handle_single_input_argument ๐Ÿ”’
Handles a single input argument, either a GitHub PR URL or a branch name, and switches to the corresponding branch.
main ๐Ÿ”’
Switch, create, and derive Git branches (including from GitHub PR URLs).
report_branch_exists ๐Ÿ”’
Prints a styled indication that the branch already exists; then indicates switch.
report_branch_new ๐Ÿ”’
Prints a styled indication that a new branch was created.
report_branch_not_created ๐Ÿ”’
Prints a styled indication that branch creation was aborted (no newline).
report_branch_switch ๐Ÿ”’
Prints a styled indication of a successful branch switch.
should_create_new_branch ๐Ÿ”’
Returns true if a new branch may be created following the desired behavior.