Skip to content

Proper git file path not detected in git worktrees #118

@rkoval

Description

@rkoval

Commands like GitHub: Blame and GitHub: Open Remote URL in Browser default back to the absolute path of your directory instead of relative to the git root in the worktree.

This can be reproduced with the following script:

#!/usr/bin/env bash
tempDir=$(mktemp -d)
git worktree add -b new-branch "$tempDir"
subl "$tempDir"

... then, once Sublime comes up, run GitHub: Blame, for example, and the GitHub URL opened up will have the absolute path in your file system, which will (most likely) not exist in GitHub

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions