X-Git-Url: https://git.phdru.name/?a=blobdiff_plain;f=.gitconfig;h=6e59db2c11e3af9e26506a73641d48a26d006260;hb=864d1291c60b1357a7072cd392cdcfe2cde970c3;hp=f8d7c44b7e628e0d4f70515f72bd613d4cfa15b7;hpb=febfff28ce2b1c96adb0fd1f670727084437289a;p=dotfiles.git diff --git a/.gitconfig b/.gitconfig index f8d7c44..6e59db2 100644 --- a/.gitconfig +++ b/.gitconfig @@ -95,12 +95,19 @@ ssb = status --short --branch - aliases = "!git config --get-regexp '^alias\\.' | colrm 1 6 | sed 's/ / = /'" + aliases = "!git config --get-regexp '^alias\\.' | cut -c7- | sed 's/ / = /'" add-alias = "!f() { [ $# = 3 ] && git config $1 alias.\"$2\" \"$3\" && return 0 || echo \"Usage: git add-(local|global)-alias \" >&2 && return 1; }; f" add-global-alias = "!exec git add-alias --global" add-local-alias = "!exec git add-alias --local" + # 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 @@ -123,6 +130,12 @@ # 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