Add git.fish script for subtree push and pull operations
This commit is contained in:
parent
7d61089ad9
commit
bd5359dcfc
1 changed files with 22 additions and 0 deletions
22
home/toph/common/optional/hyprland/ags/scripts/git.fish
Normal file
22
home/toph/common/optional/hyprland/ags/scripts/git.fish
Normal file
|
@ -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
|
Loading…
Add table
Reference in a new issue