git clone
will:
creates and checks out an initial branch that is forked from the cloned repository's currently active branch.
(i.e. where HEAD refers to in that remote repo)
So if repo is checked-out with develop on the remote server, any clone will check out the develop branch.
But, chances are your remote git repo is a bare repo one (no working tree) in order to allow pull and push.
In this case, you need to make sure that its HEAD refers to develop branch.
If it currently doesn't, clone it, checkout develop branch, push with a trivial addition, and see if any subsequent clones do checkout develop.
That would only prove that the HEAD of a bare repo can be influence by any push on it.
So the true solution would be a pre-receive hook (not an update or commit hook, since it is a bare repo) set on the bare remote repo to ensure that HEAD refers to develop branch if it exists, master otherwise.
Note: this thread mention you cannot in general influence directly the HEAD on the remote repo:
The remote command is about updating things under .git/refs/remotes
, not about updating a remote server. For updating a remote server, there is really only push.
On GitHub, a request exists to set the HEAD on a GitHub (bare by definition) repo.