cURL
curl --request POST \ --url http://localhost:3000/api/v1/git/worktrees \ --header 'Content-Type: application/json' \ --cookie nut-session= \ --data ' { "path": "<string>", "branch": "<string>", "createBranch": false } '
{ "success": true, "data": { "worktree": { "path": "<string>", "branch": "<string>", "commit": "<string>", "locked": true, "prunable": true } } }
Create a new Git worktree
Session cookie authentication
Worktree path
Branch name
Create new branch
Worktree created
Show child attributes
Associated branch
HEAD commit SHA
Is worktree locked
Can be pruned