From ab53cff2a3f326fd7d9ee688f48e1844bc4e784b Mon Sep 17 00:00:00 2001 From: Julian Prein Date: Thu, 31 Mar 2022 17:41:54 +0200 Subject: [PATCH] git:checkout-worktree: Update description Add description in one sentence and use cases for this. Remove sentence about removing `TEMP_DIR` that is outdated since: 5a8b5ffd21ce ("git:checkout-worktree: Use `mktemp` template") --- .config/zsh/autoload/git/git-checkout-worktree | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.config/zsh/autoload/git/git-checkout-worktree b/.config/zsh/autoload/git/git-checkout-worktree index 315012d..40b7e1a 100755 --- a/.config/zsh/autoload/git/git-checkout-worktree +++ b/.config/zsh/autoload/git/git-checkout-worktree @@ -1,10 +1,16 @@ #!/usr/bin/env zsh +# Create a temporary worktree. +# +# Useful for doing quick tasks on other branches without modifying the current +# working tree. So no broken/outdated symlinks to dotfiles or unnecessary +# recompiling after switching back for example. +# # Checks out the first argument in a worktree at a temporary directory. Then # spawns an interactive shell inside of it. # When the shell closes the worktree is tried to be removed. Until that works # without problems (e.g. dirty), a new shell is spawned to resolve all conflicts -# (e.g. stashing). Finally the temporary directory is deleted. +# (e.g. stashing). # # Instead of dropping in an interactive shell, the commands to execute can be # passed via stdin. If any conflicts arise, all further shells are interactive.