Skip to content

remove the worktree dir if it already exists #411

@Liujingfang1

Description

@Liujingfang1

We saw the git-sync log errors like this

"Run(git worktree add /repo/root/rev-<COMMIT> origin/<BRANCH>): exit status 128:
 { stdout: \"Preparing worktree (detached HEAD 820c5bf)\\n\", 
stderr: \"fatal: '/repo/root/rev-<COMMIT>' already exists\\n\" 

The existing dir repo/root/rev-<COMMIT> was from a previous unsuccessful sync.

It blocks that syncing the latest commit. This can be fixed by removing the pre-existing dir before running git worktree add.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions