[Rd] Why R should never move to git

Iñaki Úcar i.ucar86 at gmail.com
Thu Jan 25 17:35:23 CET 2018


2018-01-25 16:07 GMT+01:00 Duncan Murdoch <murdoch.duncan at gmail.com>:
> On 25/01/2018 7:44 AM, Gábor Csárdi wrote:
>>
>> On Thu, Jan 25, 2018 at 12:34 PM, Duncan Murdoch
>> <murdoch.duncan at gmail.com> wrote:
>> [...]
>>>
>>> but that branch doesn't show up in the Github web site.
>>
>>
>> It is right there:
>> https://github.com/dmurdoch/manipulateWidget/branches
>>
>>> Any suggestions?
>>
>>
>> Personally I would suggest to call it master, because it is just
>> easier. Your master should correspond to the upstream master, and you
>> can do your own stuff in other branches.
>
>
> That makes sense, but I don't see a way to rename branches on Github.  I did
> see a way to make it my default branch, but there's a scary warning:
>
> "Are you sure?
>
> Changing your default branch can have unintended consequences that can
> affect new pull requests and clones."
>
> To answer yes to this I would have to say "I understand, update the default
> branch", and since I don't understand the consequences, I didn't click it.

Changing the default branch just moves the HEAD pointer (on GitHub) to
another branch. It would be equivalent to ssh into GitHub's server, cd
into the repo, and enter "git checkout anotherbranch". So not a big
deal in principle, but anyway this doesn't make any difference in this
case.

Also note that the name is not important: "master" has no special
meaning as "trunk" does in svn. It's just a convention, no more.

The executive summary of this thread would be:

1. Keep the default branch synced with upstream (this is usually
"master", but it could be another), and use other branches to fix
things and submit PRs.
2. If you mistakenly committed and pushed something to it, no problem:
just fetch a fresh copy of that branch from upstream and call it by a
different name, and we're back in 1.
3. GitHub can't be blamed about how git works. ;-)

Iñaki

>
> Duncan Murdoch



More information about the R-devel mailing list