X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=Documentation%2Fgit-branch.txt;h=4f5b5d5028e15f693440baa57358ab4c898994e8;hb=efe2c9e0024bf779585a6cdc3651af5a0f8bac72;hp=72fb2f89b48ea1b80cd6c4a0bd57a9122e59ad79;hpb=9318ec234b75eed6dce10e328c93705fec89b31d;p=git.git diff --git a/Documentation/git-branch.txt b/Documentation/git-branch.txt index 72fb2f89b..4f5b5d502 100644 --- a/Documentation/git-branch.txt +++ b/Documentation/git-branch.txt @@ -8,14 +8,16 @@ git-branch - List, create, or delete branches. SYNOPSIS -------- [verse] -'git-branch' [-r] -'git-branch' [-f] [] +'git-branch' [-r] [-a] [-v] [--abbrev=] +'git-branch' [-l] [-f] [] 'git-branch' (-d | -D) ... DESCRIPTION ----------- -With no arguments given (or just `-r`) a list of available branches +With no arguments given a list of existing branches will be shown, the current branch will be highlighted with an asterisk. +Option `-r` causes the remote-tracking branches to be listed, +and option `-a` shows both. In its second form, a new branch named will be created. It will start out with a head equal to the one given as . @@ -23,7 +25,8 @@ If no is given, the branch will be created with a head equal to that of the currently checked out branch. With a `-d` or `-D` option, `` will be deleted. You may -specify more than one branch for deletion. +specify more than one branch for deletion. If the branch currently +has a ref log then the ref log will also be deleted. OPTIONS @@ -34,15 +37,33 @@ OPTIONS -D:: Delete a branch irrespective of its index status. +-l:: + Create the branch's ref log. This activates recording of + all changes to made the branch ref, enabling use of date + based sha1 expressions such as "@{yesterday}". + -f:: Force the creation of a new branch even if it means deleting a branch that already exists with the same name. -r:: - List only the "remote" branches. + List the remote-tracking branches. + +-a:: + List both remote-tracking branches and local branches. + +-v:: + Show sha1 and subject message for each head. + +--abbrev=:: + Alter minimum display length for sha1 in output listing, + default value is 7. :: The name of the branch to create or delete. + The new branch name must pass all checks defined by + gitlink:git-check-ref-format[1]. Some of these checks + may restrict the characters allowed in a branch name. :: The new branch will be created with a HEAD equal to this. It may