git branch
List, create, or delete branches
Options
Name | Description |
---|---|
-a, --all | List both remote-tracking and local branches |
-d, --delete <arg...> | Delete fully merged branch |
-D <arg...> | Delete branch (even if not merged) |
-m, --move <arg> <arg> | Move/rename a branch and its reflog |
-M <arg> <arg> | Move/rename a branch, even if target exists |
-c, --copy | Copy a branch and its reflog |
-C | Copy a branch, even if target exists |
-l, --list | List branch names |
--create-reflog | Create the branch's reflog |
--edit-description <arg> | Edit the description for the branch |
-f, --force | Force creation, move/rename, deletion |
--merged <commit> | Print only branches that are merged |
--no-merged <commit> | Print only branches that are not merged |
--column | List branches in columns [=<style>] |
--no-column | Doesn't display branch listing in columns |
--sort <key> | Field name to sort on |
--points-at <object> | Print only branches of the object |
-i, --ignore-case | Sorting and filtering are case insensitive |
--format <format> | Format to use for the output |
-r, --remotes | Lists or deletes (if used with -d) the remote-tracking branches |
--show-current | Prints the name of the current branch |
-v, --verbose |
|
-q, --quiet | Suppress non-error messages |
--abbrev <Number> | Shows the shortest prefix that is at least <n> hexdigits long that uniquely refers the object |
--no-abbrev | Displays the full sha1s in the output listing |
-t, --track <branch> [start point] | When creating a new branch, set up 'upstream' configuration |
--no-track <arg> [arg] | Do not set up 'upstream' configuration, even if the branch.autoSetupMerge configuration variable is true |
-u, --set-upstream-to [upstream] | Sets branch to upstream provided |
--unset-upstream [upstream] | Removes the upstream information |
--contains [commit] | Only lists branches which contain the specified commit |
--no-contains [commit] | Only lists branches which don't contain the specified commit |
--color [when] | Color branches to highlight current, local, and remote-tracking branches |
--no-color | Turns off branch colors |