view .gitconfig @ 863:7611b27e7cc3

add an alias for oneline logs
author Jeff Hammel <k0scist@gmail.com>
date Thu, 07 Jun 2018 13:49:20 -0700
parents 66321798ac82
children 7191914724f0
line wrap: on
line source

[core]
	excludesfile = /home/jhammel/.gitignore
[user]
	name = Jeff Hammel
	email = jeff@leapyear.io
[alias]
        branches = branch -a
        current-branch = rev-parse --abbrev-ref HEAD
        discard = reset HEAD --hard
        ll = git log --oneline
        graph = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cd)%Creset' --abbrev-commit --date=relative
        patch = !git diff > ~/$(git rev-parse --abbrev-ref HEAD).diff
        pushbranch = !git push origin $(git rev-parse --abbrev-ref HEAD)
        root = rev-parse --show-toplevel
        st = status
        subscribe-pulls = !"f() { REMOTE=${1:-origin}; if ! git config --local --get-all remote.${REMOTE}.fetch | grep -q refs/pull; then echo 'subscribing...' 2>&1; git config --local --add remote.${REMOTE}.fetch '+refs/pull/*/head:refs/remotes/pr/*'; fi; }; f"
        undo = reset HEAD~
        up = !git pull origin master && git push origin master
        wip = !git commit -a -m 'wip' && git push origin $(git rev-parse --abbrev-ref HEAD)

[credential]
        helper = cache --timeout=10000
[diff]
	submodule = log