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

Git can't switch from tag to branch #31

Open
niels-nijens opened this issue Jun 6, 2016 · 0 comments
Open

Git can't switch from tag to branch #31

niels-nijens opened this issue Jun 6, 2016 · 0 comments

Comments

@niels-nijens
Copy link
Member

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"
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

1 participant