]> git.phdru.name Git - dotfiles.git/blobdiff - .gitconfig
.gitconfig: add (un)assume aliases
[dotfiles.git] / .gitconfig
index 96982e4f56411707f1a2f6f999e65205568a7b53..74673ebc1a69274ad78e0ebb1ec5a508f9675d03 100644 (file)
 
   ssb = status --short --branch
 
-  aliases = !"git config --get-regexp 'alias.' | colrm 1 6 | sed 's/ / = /'"
+  aliases = "!git config --get-regexp '^alias\\.' | colrm 1 6 | sed 's/ / = /'"
 
   add-alias = "!f() { [ $# = 3 ] && git config $1 alias.\"$2\" \"$3\" && return 0 || echo \"Usage: git add-(local|global)-alias <new alias> <original command>\" >&2 && return 1; }; f"
   add-global-alias = "!exec git add-alias --global"
   add-local-alias = "!exec git add-alias --local"
 
-  tags = tag -n1 --list
+  # Last tag in the current branch
+  lasttag = describe --tags --abbrev=0
+
+  # Latest annotated tag in all branches
+  lasttagged = !git describe --tags `git rev-list --tags --max-count=1`
+
+  # List all tags
+  tags = tag --list -n1
 
   # Find text in any commit ever
   grep-all = !"f() { git rev-list --all | xargs git grep \"$@\"; }; f"
   # Get the current branch name
   branch-name = rev-parse --abbrev-ref HEAD
 
+  assume   = update-index --assume-unchanged
+  unassume = update-index --no-assume-unchanged
+  # assume-all = "!git st -s | awk {'print $2'} | xargs git assume"
+  unassume-all = "!git assumed | xargs git update-index --no-assume-unchanged"
+  assumed  = !"git ls-files -v | grep ^h | cut -c 3-"
+
        branches = branch --all
        ca = commit --all
        cv = commit --verbose