Skip to content

Commit c037deb

Browse files
committed
simplify git aliases
1 parent ac6960f commit c037deb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

home/git.nix

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,8 @@
8080
new = "log-pretty @{u}...";
8181
p = "pull --prune --all --autostash";
8282
pm = "!git fetch origin $(git main):$(git main) 2>/dev/null";
83-
stack = "!git log --decorate=short --pretty='format:%D' origin/$(git main).. | sed 's/, /\\n/g; s/HEAD -> //' | grep -Ev '^$'";
84-
puf = "!git log --decorate=short --pretty='format:%D' origin/$(git main).. | sed 's/, /\\n/g; s/HEAD -> //' | grep -Ev '^$' | xargs git push --set-upstream --force-with-lease --force-if-includes origin";
83+
stack = "!git log --pretty='format:%D' $(git main).. | cut -d' ' -f3";
84+
puf = "!git stack | xargs git push --set-upstream --force-with-lease --force-if-includes origin";
8585
rb = "!f() {
8686
if [ $# -eq 0 ]; then
8787
git fetch origin $(git main):$(git main)

0 commit comments

Comments
 (0)