aboutsummaryrefslogtreecommitdiffhomepage
path: root/.config/git
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2022-10-15 10:49:45 +0900
committernsfisis <nsfisis@gmail.com>2022-10-15 10:49:45 +0900
commitb3d186476fcc63fe6aaa530679ca169f1727f821 (patch)
treed3ef2caaa8e2979dba4591ae1d0bc61f17bc57df /.config/git
parent74c7ef7ba587292b53369a16b0b6039438603b9d (diff)
downloaddotfiles-b3d186476fcc63fe6aaa530679ca169f1727f821.tar.gz
dotfiles-b3d186476fcc63fe6aaa530679ca169f1727f821.tar.zst
dotfiles-b3d186476fcc63fe6aaa530679ca169f1727f821.zip
git: port the implementation of alias "git-sw" to Golang
Diffstat (limited to '.config/git')
-rw-r--r--.config/git/config8
1 files changed, 1 insertions, 7 deletions
diff --git a/.config/git/config b/.config/git/config
index 9036d3e..6e795b8 100644
--- a/.config/git/config
+++ b/.config/git/config
@@ -62,13 +62,7 @@
fixup = commit --fixup
amend = commit --amend --no-edit
clone1 = clone --depth=1
- sw = "!__fn() { \
- if [[ \"$1\" == origin/* || \"$1\" == upstream/* ]]; then \
- git switch -d \"$@\"; \
- else \
- git switch \"$@\"; \
- fi; \
- }; __fn"
+ sw = "!~/bin/gitalias/git-sw"
swc = switch -c
swm = "!__fn() { \
if git rev-parse --verify --quiet main > /dev/null 2>&1; then \