Skip to content
This repository was archived by the owner on Apr 16, 2024. It is now read-only.
This repository was archived by the owner on Apr 16, 2024. It is now read-only.

Git can't switch from tag to branch #31

@niels-nijens

Description

@niels-nijens

When you call Repository::checkout with a tag (eg. 0.1.0) and the working directory is empty. Git creates a clone with only the 0.1.0 tag and locks the tag within the fetch configuration.

This way you won't be able to switch to for example the master branch.

A possible solution would be to update the configuration of the git clone by executing a git config command:

git config remote.origin.fetch "+refs/heads/master:refs/remotes/origin/master"

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