0

Whenever I did a git clone <Repository SSH URL>, followed by git branch, it will always shows me master branch.

Until very recently, I am performing the above same steps for another repository, however I keep getting the develop branch instead of the master branch. While I manage to find a solution - git clone <Repository SSH URL> -b master, I am wondering what causes git clone command to get develop branch in the first place?

FYI, both the develop and master branch in the repository are definitely up to date and I am unable to gather much results between this repository and the other repositories (those that give me master branch)...

Any insights?

dissidia
  • 1,531
  • 3
  • 23
  • 53

1 Answers1

1

Depending on which git workflow is used by the repo's maintainers, the default branch could be anything but master. The repo should have some documentation related to their workflow and which branch will be checked out by default. If accessed via GitLab or GitHub, just take a look at the repo's settings to find the default branch.

Adrian J. Moreno
  • 14,350
  • 1
  • 37
  • 44
  • Thanks for the info! Doing a `git remote show origin`, it is showing the `develop` as the HEAD branch.. Will check the repository for any documentation.. – dissidia Jul 10 '18 at 22:52