From bd5359dcfc056b62e36ee8d27ca9d06ed2c69765 Mon Sep 17 00:00:00 2001 From: Chris Toph Date: Sat, 22 Mar 2025 03:44:42 -0400 Subject: [PATCH] Add git.fish script for subtree push and pull operations --- .../optional/hyprland/ags/scripts/git.fish | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 home/toph/common/optional/hyprland/ags/scripts/git.fish diff --git a/home/toph/common/optional/hyprland/ags/scripts/git.fish b/home/toph/common/optional/hyprland/ags/scripts/git.fish new file mode 100644 index 0000000..5126cb0 --- /dev/null +++ b/home/toph/common/optional/hyprland/ags/scripts/git.fish @@ -0,0 +1,22 @@ +#!/usr/bin/env fish + +if test (count $argv) -ne 1 + echo "Usage: $argv0 push|pull" + exit 1 +end + +set action $argv[1] +set subtree_path "home/toph/common/optional/hyprland/ags" +set remote "RyotShell-origin" +set branch "main" + +cd (git rev-parse --show-toplevel) +switch $action + case push + git subtree push --prefix="$subtree_path" $remote $branch + case pull + git subtree pull --prefix="$subtree_path" $remote $branch + case '*' + echo "Unknown argument. Use push or pull." + exit 1 +end \ No newline at end of file