vibe-kanban icon indicating copy to clipboard operation
vibe-kanban copied to clipboard

Worktree is not created correctly from the branch

Open skylarbpayne opened this issue 4 months ago • 8 comments

Image

Completely default implementation on fresh project created.

When I run the task, it has a giant diff, which is literally just deleting all the files in the repo (so it's empty).

skylarbpayne avatar Dec 04 '25 00:12 skylarbpayne

Hi @skylarbpayne - I can see a hook's running, could you share the script that's running in that hook? Might be causing something...

stunningpixels avatar Dec 04 '25 11:12 stunningpixels

Sorry for late response! Didn't see the notificaiton.

I'm not 100% what hook here is running but the hooks I have:

  1. I set up beads, so SessionStart calls bd prime; can't imagine that causing an issue.
  2. I have a PreToolUse that basically blocks git commit / git push / gh pr create (because beads is a bit overeager about creating published PRs that I haven't reviewed... which my colleagues aren't too happy about)
"hooks": {
    "PreCompact": [
      {
        "matcher": "",
        "hooks": [
          {
            "type": "command",
            "command": "bd prime"
          }
        ]
      }
    ],
    "SessionStart": [
      {
        "matcher": "",
        "hooks": [
          {
            "type": "command",
            "command": "bd prime"
          }
        ]
      }
    ],
    "PreToolUse": [
      {
        "matcher": "Bash",
        "hooks": [
          {
            "type": "command",
            "command": "python3 -c \"import json, sys, re; data=json.load(sys.stdin); cmd=data.get('tool_input',{}).get('command',''); patterns=[r'git\\s+commit', r'git\\s+push', r'gh\\s+pr\\s+create']; sys.exit(2 if any(re.search(p, cmd) for p in patterns) else 0)\""
          }
        ]
      }
    ]
  },

Looks like beads may have been the issue... not sure why 🤔 . Removed and now I'm back! Thanks~

skylarbpayne avatar Dec 09 '25 16:12 skylarbpayne

ACtually spoke too soon, after removing all hooks, the same thing happened:

Image

See no hook run.

but diff shows everything deleted: Image

skylarbpayne avatar Dec 09 '25 17:12 skylarbpayne

one other interesting thing: it seems it actually created the new file in main (rather than in a worktree branch off of main)

skylarbpayne avatar Dec 09 '25 17:12 skylarbpayne

Please check if git worktree add works in your repo. In your main repo, run the command git worktree add /tmp/test-worktree, then cd /tmp/test-worktree and inspect the created work tree.

abcpro1 avatar Dec 09 '25 17:12 abcpro1

Yes, that works. Creates a clean worktree with a new branch off whatever branch I was on when I created the worktree.

skylarbpayne avatar Dec 15 '25 01:12 skylarbpayne

@abcpro1 / @stunningpixels -- is there a way for me to like completely wipe my vibe-kanban state? I'm not exactly sure where it saves data. I want to do a totally fresh start to see if that works.

skylarbpayne avatar Dec 19 '25 17:12 skylarbpayne

Vibe Kanban data is stored in the following directories: Linux ~/.local/share/vibe-kanban macOS ~/Library/Application Support/ai.bloop.vibe-kanban Windows %APPDATA%\bloop\vibe-kanban\data

abcpro1 avatar Jan 05 '26 18:01 abcpro1