git hitting an error :- error: cannot delete branch 'main' used by worktree at 'C:/work/python/langchain-tool'

While trying to delete my main branch i ran into this error. There are many possible solution. One of them could be this


cd "C:/work/python/langchain-tool"

git worktree list # see the work tree 

git switch master   # or any other branch

Then try to remove it

git branch -d main





    


Comments

Popular posts from this blog

Windows SSH: Permissions for 'private-key' are too open

NodeJS: Error: spawn EINVAL in window for node version 20.20 and 18.20