New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow people to use master as an alias for devel in git #43
Comments
I am +1 on that, that's already what I do, but I didn't realise this could be done on the repo directly. |
@abadger I did some more research, and learned that while this is "technically" possible, Git does not allow to push symbolic references. GitHub does allow to update the HEAD symbolic reference (by means of changing the default branch) but has no means of adding other symbolic references. Once set though, others can pull them (like normal branches etc.) so the limitation here is GitHub (or the Git protocol if you like). http://git.661346.n2.nabble.com/Pushing-symbolic-references-to-remote-repositories-td7573536.html For GitLab there is a feature-request to allow for this: |
So will that make PRs harder? if someone pushes one to /master but we need to merge it into /devel ? |
@bcoca How it is now working on my system, if you checkout master, it is devel for git.
What I did for this was actually:
And for Git
So while it looks as if both branches simply reference the same commit, in practice one points to the other as if it were the same branch. |
And to proof that this works in Git itself, that's how the default branch is being selected:
|
nice, if it is transparent i have no opposition I don't get the 'difficulty' of not having a 'master', but if people really want it.... |
haha and when I suggested this on IRC someone yelled at me if that's how you use it, doesn't mean we have to use it too lol |
@dminca I think it is important to use (or abide) to standard practices, where possible. I would prefer the default branch is called master, but if there is a solution that allows both, why not do that. Unfortunately it seems GitHub at this time does not allow us to do this through their Web-interface. However, maybe there is another way to do this on GitHub, I don't know yet. |
Some notes from irc core meeting 2016-12-15
|
I couldn't agree more @dagwieers, since git was designed, the master branch was used by many as continuous trunk of development. When you want to release, you branch off for that release. |
This still needs doing: #action Figure out if this works on github. dag, bcoca, abadger1999 |
Also we need to know what the real benefits are |
Jimi-C said no Closing |
Proposal: Allow people to use master as an alias for devel in git
Date: 2016/12/12
Motivation
Many git projects use master to mean their default trunk branch. Ansible uses devel for historical reasons. This confuses other users
Solution proposal
So the solution proposed is to run:
Testing (optional)
Make a new local copy of the repository and then run
git symbolic-ref -m "Add compatibility for people used to a default master branch" master refs/heads/devel
Then test:
The text was updated successfully, but these errors were encountered: