From 1a6bb078b1f5e5b860dea5e8b5e70db1b723ef74 Mon Sep 17 00:00:00 2001 From: Baitinq Date: Mon, 16 Jan 2023 13:56:20 +0100 Subject: Home: Add git 'pr' alias --- hosts/home.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/hosts/home.nix b/hosts/home.nix index f332c7a..2efd78d 100644 --- a/hosts/home.nix +++ b/hosts/home.nix @@ -117,6 +117,9 @@ signByDefault = true; key = "18BE4F736F27FC190C1E1000BB3C0BC698650937"; }; + aliases = { + pr = "!f() { git fetch -fu \${2:-origin} refs/pull/$1/head:pr/$1 && git checkout pr/$1; }; f"; + }; extraConfig = { push.autoSetupRemote = true; init.defaultBranch = "master"; -- cgit 1.4.1