Skip to main content

% git-branch(1) Version 0.1.5 | git-branch

git-branch

DESCRIPTION

Branch listing or checkout

  • without arguments, shows all branches
  • with the name of the branch, perform a checkout that will always work

CHECKOUT

A branch checkout that will always work

  • stash actual changes
  • create the branch if it does not exist
  • checkout the branch
  • un-stash

SYNOPSIS

List, switch to or create a branch

git-branch [options] [branch_name]

Options:

  • -nr or --no-recurse to not recurse in submodule

Args:

  • without branch name, the local and remotes branches are listed
  • with a branch name
    • the branch is created if it does not exist
    • the work is stashed
    • the working branch is changed
    • the optional stashed work is popped

SUBMODULE

By default, this command will recurse over submodule