From 390f6e6794cd2b91450cc2731c2e403062e9e650 Mon Sep 17 00:00:00 2001 From: sev Date: Sat, 23 Mar 2024 06:32:25 -0500 Subject: [PATCH 1/1] git: update config, aliases; add config.local --- .gitignore | 3 +++ etc/git/config | 8 ++++++-- etc/zsh/.zshrc | 3 +++ 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 50c8259..e432edc 100644 --- a/.gitignore +++ b/.gitignore @@ -10,3 +10,6 @@ # zsh local /etc/zsh/.z*.local + +# git local +/etc/git/config.local diff --git a/etc/git/config b/etc/git/config index 1f7f15e..ae73c10 100644 --- a/etc/git/config +++ b/etc/git/config @@ -7,7 +7,11 @@ submodules-pull = submodule foreach git pull origin master pr = "!f() { git fetch -fu ${2:-origin} refs/pull/$1/head:pr/$1 && git checkout pr/$1; }; f" tree = log --oneline --graph --branches --color -[pull] - ff = only + [init] defaultBranch = master +[pull] + ff = only + +[include] + path = config.local diff --git a/etc/zsh/.zshrc b/etc/zsh/.zshrc index d1d10dd..55e9c6e 100644 --- a/etc/zsh/.zshrc +++ b/etc/zsh/.zshrc @@ -248,6 +248,7 @@ alias pa=$ps alias spa="sudo $ps" unset ps ## git +alias g=git alias gd='git diff' alias gdh='git diff HEAD' alias ga='git add' @@ -256,6 +257,8 @@ alias gc='git commit' alias gca='git commit --amend' alias gp='git push' alias gu='git pull' +alias gl='git log' +alias gt='git tree' # from gitconfig ## cd/zoxide function up { \cd $(printf '../%.0s' {1..${1:-1}}) -- 2.47.0