Add worktree sync subcommand
This `worktree sync` subcommand follows on from removing symbolic links from `worktree add` to update all worktrees which don't have the latest version of shared files from the root worktree.
This commit is contained in:
@@ -32,6 +32,7 @@ _worktree() {
|
||||
'ls:List managed worktrees'
|
||||
'remove:Remove a worktree by branch'
|
||||
'rm:Remove a worktree by branch'
|
||||
'sync:Sync copied files from root to worktrees'
|
||||
)
|
||||
_describe -t commands 'worktree command' commands "$@"
|
||||
;;
|
||||
@@ -44,6 +45,9 @@ _worktree() {
|
||||
(rm|remove)
|
||||
_arguments '*:: :__worktree_active_branches'
|
||||
;;
|
||||
(sync)
|
||||
_arguments '*:: :__worktree_active_branches'
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
|
||||
Reference in New Issue
Block a user