Skip to content

Error on checkout with branch name containing slash #295

Closed
@zdateh

Description

@zdateh

image

The full error is:

M	rtn/saCLN05.mac

fatal: cannot lock ref 'refs/heads/feature': 'refs/heads/feature/smxc_latest' exists; cannot create 'refs/heads/feature'

The modified *.mac I know about, but git would normally be fine with branchcheckout when a file is modified. It looks like the branchname is causing a fatal severe error. The branch being checked out via the studio Git UI is
feature/chgNNNNNN_some_description
The error mentions another branch
feature/smxc_latest
which also exists in the repo, but wasn't checked out immediately previously. My guess is the slash is confusing the scripts in some way, causing multiple branch names containing feature/* to clash in some way? Just my guess!

Doing the checkout of the same branch via Git bash works fine:

Switched to a new branch 'feature/chg0172358_contact_detail_BEDs'
M       rtn/saCLN05.mac
branch 'feature/chg0172358_contact_detail_BEDs' set up to track 'origin/feature/chg0172358_contact_detail_BEDs'.

Thanks,
Chris

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingcustomerBased on customer feedback (as opposed to something identified by developers)

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions