Cloned repo, selected wrong checkout branch, how do I undo this?

When cloning a repo in Sourcetree, I selected develop instead of master under the advanced options.

I haven't made any commits.

Now, I only see the develop branch and cannot use git flow to create a new feature branch until I have the master.

Can I remove the repo without losing and changes and just clone again?

1 answer

  • answered 2019-06-12 05:14 PrivateOmega

    I haven't used source tree, but if you somehow cloned the repo with develop branch and you are missing master, do a simple checkout of master using following command. This pulls master branch and checkout master branch in your local repo.

    git checkout master 

    I guess after this you can initialize git flow and put in the respective branch names during configuration.