- 作者: 川野辺正博
- 出版社/メーカー: 秀和システム
- 発売日: 2012/09/18
- メディア: 単行本
- 購入: 1人 クリック: 32回
- この商品を含むブログ (13件) を見る
$ git log --oneline --graph --decorate --all
をgit loggraphというコマンドに設定する。
$ git config --global alias.loggraph 'log --oneline --graph --decorate --all'
上記のコマンドを設定すると ~/.gitconfig に
[alias] loggraph = log --oneline --graph --decorate --all
が追加されます。
ちなみに--onelineはGit - git-log Documentationによると
--oneline:: This is a shorthand for "--pretty=oneline --abbrev-commit" used together.
(一行目のタイトル行表示&ハッシュの冒頭表示)とのこと。
また--decorateはタグ名が表示されます。
--decorate[=short|full|no] Print out the ref names of any commits that are shown. If short is specified, the ref name prefixes refs/heads/, refs/tags/ and refs/remotes/ will not be printed. If full is specified, the full ref name (including prefix) will be printed. The default option is short.
なお--prettyと(上記書籍で挙げられている)--formatは同じようです。
--pretty[=<format>]:: --format=<format>:: Pretty-print the contents of the commit logs in a given format, where '<format>' can be one of 'oneline', 'short', 'medium', 'full', 'fuller', 'email', 'raw' and 'format:<string>'. See the "PRETTY FORMATS" section for some additional details for each format. When omitted, the format defaults to 'medium'. + Note: you can specify the default pretty format in the repository configuration (see linkgit:git-config[1]).
その他はこちらも参考に。
git log --graph --all --color --pretty='%x09%h %cn%x09%s %Cred%d' --graph: ツリー表示が付く --all: 全てのログ。カレントのブランチだけに限らず。 --color: 色 --pretty: ログのフォーマット。%dが branch。 git logで、gitk --all くらい情報ほしい CodingFirst