Improve git config

+ Replace 'git browse' (hub-only) with git-open
+ Add URL aliases for github, gist and gitlab
+ Replace 'git branch' alias with 'git branch -av'
This commit is contained in:
Henrik Lissner 2020-10-05 17:00:17 -04:00
parent a75c64d04a
commit 344ed305c5
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395
3 changed files with 15 additions and 2 deletions

View file

@ -5,8 +5,8 @@ g() { [[ $# = 0 ]] && git status --short . || git $*; }
alias git='noglob git'
alias ga='git add'
alias gap='git add --patch'
alias gb='git branch'
alias gbr='git browse'
alias gb='git branch -av'
alias gop='git open'
alias gbl='git blame'
alias gc='git commit'
alias gcm='git commit -m'

View file

@ -29,3 +29,15 @@
smudge = git-lfs smudge -- %f
process = git-lfs filter-process
clean = git-lfs clean -- %f
[url "https://github.com/"]
insteadOf = gh:
[url "git@github.com:hlissner/"]
insteadOf = gh:/
[url "https://gitlab.com/"]
insteadOf = gl:
[url "https://gist.github.com/"]
insteadOf = gist:
[url "https://bitbucket.org/"]
insteadOf = bb:
[url "https://git.v0.com"]
insteadOf = v0:

View file

@ -11,6 +11,7 @@ in {
config = mkIf cfg.enable {
user.packages = with pkgs; [
gitAndTools.gh
gitAndTools.git-open
gitAndTools.diff-so-fancy
(mkIf config.modules.shell.gnupg.enable
gitAndTools.git-crypt)