From 25d56990cd7cc0bad85f3568cc200436b4d3b8e1 Mon Sep 17 00:00:00 2001 From: Martin Larsson Date: Tue, 15 Jul 2025 12:20:53 +0200 Subject: [PATCH] Improve git workflow: enable fsmonitor and untrackedCache, add watchman, improve some git aliases --- git/config | 6 ++++++ nix/home/default.nix | 1 + zsh/.zshrc | 8 ++++++-- 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/git/config b/git/config index af617a4..feb9eb7 100644 --- a/git/config +++ b/git/config @@ -5,6 +5,8 @@ compression = 9 whitespace = error preloadindex = true + fsmonitor = true + untrackedCache = true [status] branch = true @@ -38,6 +40,10 @@ [rebase] autoStash = true missingCommitsCheck = true + autosquash = true + +[merge] + ff = false [log] abbrevCommit = true diff --git a/nix/home/default.nix b/nix/home/default.nix index 31cb96a..2cacb24 100644 --- a/nix/home/default.nix +++ b/nix/home/default.nix @@ -129,6 +129,7 @@ in rainfrog atac p7zip + watchman ]; file = utils.mk_symlinks { inherit config dotfiles; }; diff --git a/zsh/.zshrc b/zsh/.zshrc index 9988d7d..6f4efaf 100644 --- a/zsh/.zshrc +++ b/zsh/.zshrc @@ -135,11 +135,12 @@ alias gsu="git submodule update --init --recursive --force" alias gc="git commit --verbose --template=$HOME/.config/git/commit-template.txt" alias gp="git push" alias gu="git pull" +alias gf="git fetch" alias gsw="git switch" alias gswc="git switch --create" alias gb="git branch" -alias gr="git restore --staged" -alias gre="git restore" +alias grs="git restore --staged" # git restore staged +alias grw="git restore" # git restore working alias ga="git add" alias gap="git add --patch" alias gi="git init" @@ -148,6 +149,9 @@ alias gd="git diff --output-indicator-new=' ' --output-indicator-old=' '" alias gds="git diff --staged --output-indicator-new=' ' --output-indicator-old=' '" alias gl="git log --all --graph --pretty=format:'%C(magenta)%h %C(white) %an %ar%C(auto) %D%n%s%n'" alias gm="git merge" +alias gr="git rebase" +alias grc="git rebase --continue" +alias gri="git rebase --interactive" # Alias functions vif() {