Explorar el Código

add `git branch` aliases to show hashes, add `glh`, use graph in `glp`

Weiyi Lou hace 12 años
padre
commit
e3cccfbe1b
Se han modificado 4 ficheros con 10 adiciones y 4 borrados
  1. 1 1
      vim/bundle/surround
  2. 1 1
      vim/bundle/vim-snippets
  3. 1 1
      zsh/oh-my-zsh
  4. 7 1
      zsh/omz-custom/git.zsh

+ 1 - 1
vim/bundle/surround

@@ -1 +1 @@
-Subproject commit 02199ea0080d744ec76b79d74ce56d51d25cf7ae
+Subproject commit 9bf527af3ae7338346ca9f0657dc077722d517f7

+ 1 - 1
vim/bundle/vim-snippets

@@ -1 +1 @@
-Subproject commit 7cef242835973fe37feab04a947498544b00f570
+Subproject commit c7d5daf5f783f79e0badb0fb0c14ac81e2f8ee68

+ 1 - 1
zsh/oh-my-zsh

@@ -1 +1 @@
-Subproject commit 434f3bc05c5245d7a27ab0bb1ede5b78acc370a4
+Subproject commit dff966afad231f66f6e7345383412682992f9e84

+ 7 - 1
zsh/omz-custom/git.zsh

@@ -21,6 +21,8 @@ function git_compare_version() {
 POST_1_8_3_GIT=$(git_compare_version "1.8.3")
 unset -f git_compare_version
 
+# As of git 1.8.3 decorations can be coloured automatically according to what
+# they are i.e. tags, branches, etc.
 if [[ $POST_1_8_3_GIT -gt 0 ]]; then
   DECO_COLOUR='%C(auto)'
 else
@@ -39,12 +41,16 @@ alias gcob='git checkout -b'
 alias gf='git fetch --all --tags && git fetch --all --prune'
 
 alias gbd='git branch -D'
+alias gbv='git branch -v'
+alias gbav='git branch -av'
+
 # standard log with train tracks
 alias gl='git log --graph --date=short --pretty='$GIT_LOG_FORMAT
 alias gla='gl --all'
 # concise, branch and tag log with train tracks (some merge commits unavoidable)
 alias glb='gl --simplify-by-decoration'
-alias glp='git log --patch'
+alias glh='gl | head'
+alias glp='gl --patch'
 # useful when you want to have a visual on file changes
 alias gls='git log --graph --stat'
 # search through history for particular text