Skip to content

Commit

Permalink
feat(git): Add git alias to search through branch changes with fzf
Browse files Browse the repository at this point in the history
  • Loading branch information
mrjones2014 committed Jul 17, 2024
1 parent 127ad8e commit 43ff8aa
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions home-manager/modules/git.nix
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ in {
if isDarwin then "pbcopy" else "xclip -selection clipboard"
}";
pending = "!git log $(git describe --tags --abbrev=0)..HEAD --oneline";
# bc = "branch changes"
bc =
"!export MASTER_BRANCH=$(git branch -r | grep -Po 'HEAD -> \\K.*$') && git diff --name-only $MASTER_BRANCH | ${pkgs.fzf}/bin/fzf --ansi --preview 'git diff --color=always $MASTER_BRANCH {}'";
};
extraConfig = {
user = {
Expand Down

0 comments on commit 43ff8aa

Please sign in to comment.