1git-show-branch(1) 2================== 3v0.99.4, Aug 2005 4 5NAME 6---- 7git-show-branch - Show branches and their commits. 8 9SYNOPSIS 10-------- 11'git show-branch [--all] [--heads] [--tags] [--more=<n>] [--merge-base] <reference>...' 12 13DESCRIPTION 14----------- 15Shows the head commits from the named <reference> (or all refs under 16$GIT_DIR/refs/heads), and displays concise list of commit logs 17to show their relationship semi-visually. 18 19OPTIONS 20------- 21<reference>:: 22 Name of the reference under $GIT_DIR/refs/. 23 24--all --heads --tags:: 25 Show all refs under $GIT_DIR/refs, $GIT_DIR/refs/heads, 26 and $GIT_DIR/refs/tags, respectively. 27 28--more=<n>:: 29 Usually the command stops output upon showing the commit 30 that is the common ancestor of all the branches. This 31 flag tells the command to go <n> commits beyond that. 32 33--merge-base:: 34 Instead of showing the commit list, just act like the 35 'git-merge-base' command except that it can accept more 36 than two heads. 37 38 39OUTPUT 40------ 41Given N <references>, the first N lines are the one-line 42description from their commit message. The branch head that is 43pointed at by $GIT_DIR/HEAD is prefixed with an asterisk '*' 44character while other heads are prefixed with a '!' character. 45 46Following these N lines, one-line log for each commit is 47displayed, indented N places. If a commit is on the I-th 48branch, the I-th indentation character shows a '+' sign; 49otherwise it shows a space. Each commit shows a short name that 50can be used as an exended SHA1 to name that commit. 51 52The following example shows three branches, "master", "fixes" 53and "mhf": 54 55------------------------------------------------ 56$ git show-branch master fixes mhf 57! [master] Add 'git show-branch'. 58 ! [fixes] Introduce "reset type" flag to "git reset" 59 ! [mhf] Allow "+remote:local" refspec to cause --force when fetching. 60--- 61 + [mhf] Allow "+remote:local" refspec to cause --force when fetching. 62 + [mhf~1] Use git-octopus when pulling more than one heads. 63 + [fixes] Introduce "reset type" flag to "git reset" 64 + [mhf~2] "git fetch --force". 65 + [mhf~3] Use .git/remote/origin, not .git/branches/origin. 66 + [mhf~4] Make "git pull" and "git fetch" default to origin 67 + [mhf~5] Infamous 'octopus merge' 68 + [mhf~6] Retire git-parse-remote. 69 + [mhf~7] Multi-head fetch. 70 + [mhf~8] Start adding the $GIT_DIR/remotes/ support. 71+++ [master] Add 'git show-branch'. 72------------------------------------------------ 73 74These three branches all forked from a common commit, [master], 75whose commit message is "Add 'git show-branch'. "fixes" branch 76adds one commit 'Introduce "reset type"'. "mhf" branch has many 77other commits. 78 79When only one head is given, the output format changes slightly 80to conserve space. The '+' sign to show which commit is 81reachable from which head and the first N lines to show the list 82of heads being displayed are both meaningless so they are 83omitted. Also the label given to each commit does not repeat 84the name of the branch because it is obvious. 85 86------------------------------------------------ 87$ git show-branch --more=4 master 88[master] Add 'git show-branch'. 89[~1] Add a new extended SHA1 syntax <name>~<num> 90[~2] Fix "git-diff-script A B" 91[~3] git-ls-files: generalized pathspecs 92[~4] Make "git-ls-files" work in subdirectories 93------------------------------------------------ 94 95Author 96------ 97Written by Junio C Hamano <junkio@cox.net> 98 99 100Documentation 101-------------- 102Documentation by Junio C Hamano. 103 104 105GIT 106--- 107Part of the link:git.html[git] suite