From: Garbageyard <varuag.chhabra@gmail.com>
To: git@vger.kernel.org
Subject: Change default branch name (server side) while cloning a repository
Date: Fri, 27 Mar 2015 05:27:21 -0700 (MST) [thread overview]
Message-ID: <1427459241861-7627964.post@n2.nabble.com> (raw)
We use Gitolite for access control and i have admin access on Git server. I
wanted to make sure that whenever a new repository is created and is then
cloned on any machine, the default branch should point to mainline. To do
this, when I run the repository creation script, i change the content of
file HEAD of a given repository to point to mainline i.e., default entry of
“ref: refs/heads/master” in file HEAD is changed to “ref:
refs/heads/mainline”.
For example, if "work" is the repository name, then on Git server,
[gitolite@gitserver repositories]$ cd work.git/
[gitolite@gitserver work.git]$ cat HEAD
ref: refs/heads/mainline
If i now clone the repository on my local machine, then the default branch
should be pointing to mainline and not master. However, the issue is that it
still points to master. Am I /wrong/ in assuming that changing the entry in
file HEAD for a given repository on Git server will change the default
branch while cloning? If I’m wrong, can anyone please tell me how can I
enforce this change on the /server/ side correctly?
--
View this message in context: http://git.661346.n2.nabble.com/Change-default-branch-name-server-side-while-cloning-a-repository-tp7627964.html
Sent from the git mailing list archive at Nabble.com.
next reply other threads:[~2015-03-27 12:27 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-27 12:27 Garbageyard [this message]
2015-03-27 14:27 ` Change default branch name (server side) while cloning a repository Stefan Näwe
2015-03-27 16:47 ` Jeff King
2015-03-27 16:40 ` Matthieu Moy
-- strict thread matches above, loose matches on Subject: below --
2015-03-29 7:33 Gaurav Chhabra
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1427459241861-7627964.post@n2.nabble.com \
--to=varuag.chhabra@gmail.com \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).