diff options
Diffstat (limited to 'shellrc.d')
-rw-r--r-- | shellrc.d/git | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/shellrc.d/git b/shellrc.d/git index 1c1de0a..a662cb0 100644 --- a/shellrc.d/git +++ b/shellrc.d/git @@ -19,6 +19,10 @@ gitbmerge() ( local wt wt="$(_gitbworktree "$1")" if [ -n "$wt" ]; then + if [ -d "$wd/.git" ]; then + echo "Branch is checked out in root repository!" + return 1 + fi rm -r "$wt" git worktree prune fi |