Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8662727
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T16:48:10+00:00 2026-06-12T16:48:10+00:00

I know this can be done on the Admin page of a repository. Another

  • 0

I know this can be done on the Admin page of a repository. Another default branch can be set there. And that would be the answer of this question.

But I discovered (maybe a bug?) the following. If your master branch and develop branch are exactly the same, than a git clone will not clone the default “develop” branch, but still “master”!! If you commit something to the develop branch, remove your clone and than clone again, you will get the develop branch!

Is this Git behaviour or Github? And can this be fixed to set it ALWAYS to develop?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T16:48:12+00:00Added an answer on June 12, 2026 at 4:48 pm

    This is a git “feature”

    I just tested it with local repo, and while the HEAD of my first repo test is “develop“:

    C:\Users\VonC\Documents\GitHub\test>git symbolic-ref HEAD
    refs/heads/develop
    

    … the name of the default branch cloned in test1 is master!

    C:\Users\VonC\Documents\GitHub\test1>git branch -a
    * master
      remotes/origin/HEAD -> origin/master
      remotes/origin/develop
      remotes/origin/master
    

    See “How do I change a Git remote HEAD to point to something besides “master”“:
    From the cloned repo perspective, HEAD on the remote origin repo references both master and develop:

    C:\Users\VonC\Documents\GitHub\test1>git ls-remote origin
    c215dd28ea8bf9b0c6b522c784b70bbbb3e858a5        HEAD
    c215dd28ea8bf9b0c6b522c784b70bbbb3e858a5        refs/heads/develop
    c215dd28ea8bf9b0c6b522c784b70bbbb3e858a5        refs/heads/master
    

    And the order for determining the default branch of a cloned repo is:

    • HEAD references refs/heads/master and that exists
      -> you get a local branch called master, starting from origin/master
    • HEAD references refs/heads/anotherBranch and that exists
      -> you get a local branch called anotherBranch, starting from origin/anotherBranch
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I know that this can be easily done by using if(i%5 == 0 OR
I know this can be done for Windows and that XGrabKey can be used
I know this can be done and i have seen it done using some
This is something I know can be done somehow , because I've done it
I know I've done this before years ago, but I can't remember the syntax,
I know this can seem a weird question but for me it would be
I would like to split a line into words. I know this can be
How can I remove a shipment that was created accidentally? I know there is
I know this is possible in Perl, but I was wondering if this can
I’m trying to implement a simple fixed headers table. I know this can in

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.