diff --git a/.config/scripts/tool/git.sh b/.config/scripts/tool/git.sh index 25c2fbb..fdc9860 100644 --- a/.config/scripts/tool/git.sh +++ b/.config/scripts/tool/git.sh @@ -55,3 +55,10 @@ function restore() { git restore --staged "$(git status | grep modified: | sed -e 's/ *.*: *//g' | tac | fzf -m)" git status } + +function offMain() { + is_in_git_repo || return + git fetch origin main:main + git checkout main + git checkout -b "$1" +}