Skip to content
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

Set default branch to main #619

Closed
3 tasks done
jbteves opened this issue Oct 26, 2020 · 12 comments · Fixed by #667
Closed
3 tasks done

Set default branch to main #619

jbteves opened this issue Oct 26, 2020 · 12 comments · Fixed by #667
Labels
community issues related to building a healthy community discussion issues that still need to be discussed

Comments

@jbteves
Copy link
Collaborator

jbteves commented Oct 26, 2020

Summary

We have changed the default branch from master to main per unanimous agreement among the steering committee. Please contact me at joshua.teves@nih.gov if you have any issues with the switch. GitHub's recommended method of switching your local repository is the following:

git branch -m master main
git fetch origin
git branch -u origin/main main

HOWEVER, it may be the case that your personal fork is origin and the main repository is upstream (or some similar variant). In that case, please do the following:

  1. Switch your branch from master to main in your repository Settings under "Branches." (Note: GitHub will already alert you that the main repository has changed and encourage you to do so.)
  2. In your local repository, run the following:
git branch -m master main
git fetch upstream main
git push origin main

Next Steps

  • Solicit feedback
  • Identify places where the codebase and repository would have to modified to accommodate this change
  • Make changes as needed
@jbteves
Copy link
Collaborator Author

jbteves commented Oct 26, 2020

Tagging @ME-ICA/tedana-devs for feedback.

@jbteves jbteves added community issues related to building a healthy community discussion issues that still need to be discussed labels Oct 26, 2020
@tsalo
Copy link
Member

tsalo commented Oct 26, 2020

I believe that GitHub will automatically do this (or at least make it much easier to do) by the end of the year: see here.

EDIT: To clarify- I am very much for this, but I think we could wait a couple of months until it's easier to change.

@jbteves
Copy link
Collaborator Author

jbteves commented Oct 26, 2020

That makes sense. I'm in favor provided we have a deadline. I would say that if GitHub can't deliver the feature by December 31st, I'd like to see us set a Jan. 31 deadline for the repo itself. By that point, we'll (hopefully) have merged most major PRs anyway.

I'll also volunteer as the point of contact for helping people modify their local repositories, as that can get a bit sticky.

@tsalo
Copy link
Member

tsalo commented Jan 29, 2021

It looks like they'd streamlined the process: https://github.com/github/renaming/tree/040636ea50e945875c70cc964d586f645e9bd810#renaming-existing-branches

I think we should do this before (or immediately after) the new release.

@jbteves
Copy link
Collaborator Author

jbteves commented Jan 29, 2021

Is there any reason to not do it now, if we're all agreed on it? As a reminder, I'll take point for helping with peoples' local environments.

@tsalo
Copy link
Member

tsalo commented Jan 29, 2021

I can't think of one. All open PRs will be switched over automatically, so I'm totally fine with the change.

@jbteves
Copy link
Collaborator Author

jbteves commented Jan 29, 2021

Alright. I feel like if we get a steering committee majority confirming the change, one of us should push the button. That said, who has permission to push the button?

@notZaki
Copy link
Contributor

notZaki commented Jan 29, 2021

A potential reason not to do this right away is that there might be some tools that still assume the branch name is master. For example, poetry had this issue (still open on their repo).
This might be relevant if any of the tooling behind auto-deployment makes similar assumption---although I don't think that should be the case.

@jbteves
Copy link
Collaborator Author

jbteves commented Jan 29, 2021

Yeah, I'll open a PR to close all of these references to master:

.github/pull_request_template.md:9:https://github.com/ME-ICA/tedana/blob/master/CONTRIBUTING.md#pull-requests
CONTRIBUTING.md:128:Make sure to always [keep your fork up to date][link_updateupstreamwiki] with the master repository before and after making changes.
CONTRIBUTING.md:149:Before making a new branch, make sure your master is up to date with the following commands:
CONTRIBUTING.md:152:git checkout master
CONTRIBUTING.md:153:git fetch upstream master
CONTRIBUTING.md:154:git merge upstream/master
CONTRIBUTING.md:326:[restructuredtext]: http://www.sphinx-doc.org/en/master/usage/restructuredtext/index.html
CONTRIBUTING.md:327:[sphinx]: http://www.sphinx-doc.org/en/master/index.html
CONTRIBUTING.md:334:[link_coc]: https://github.com/ME-ICA/tedana/blob/master/CODE_OF_CONDUCT.md
README.md:14:[![Codecov](https://codecov.io/gh/me-ica/tedana/branch/master/graph/badge.svg)](https://codecov.io/gh/me-ica/tedana)
README.md:78:If you aim to contribute to the `tedana` code base and/or documentation, please first read the developer installation instructions in [our contributing section](https://github.com/ME-ICA/tedana/blob/master/CONTRIBUTING.md). You can then continue to set up your preferred development environment.
README.md:83:To get started, check out [our contributing guidelines](https://github.com/ME-ICA/tedana/blob/master/CONTRIBUTING.md)
README.md:96:We ask that all contributors to ``tedana`` across all project-related spaces (including but not limited to: GitHub, Gitter, and project emails), adhere to our [code of conduct](https://github.com/ME-ICA/tedana/blob/master/CODE_OF_CONDUCT.md).
docs/conf.py:67:# The master toctree document.
docs/conf.py:68:master_doc = 'index'
docs/contributing.rst:9:.. _contributing guide: https://github.com/ME-ICA/tedana/blob/master/CONTRIBUTING.md
docs/contributing.rst:22:.. _The full code of conduct is here: https://github.com/ME-ICA/tedana/blob/master/CODE_OF_CONDUCT.md
docs/contributing.rst:175:.. _an LGPL2 license: https://github.com/ME-ICA/tedana/blob/master/LICENSE
docs/developing.rst:114:First, we merge the repository's ``master`` branch into our own to make sure we're up to date, and
docs/developing.rst:146:We merge any changes from the upstream master branch into our branch via
docs/developing.rst:151:    git fetch upstream master
docs/developing.rst:152:    git merge upstream/master
docs/developing.rst:202:    git checkout master
docs/developing.rst:203:    git fetch upstream master
docs/developing.rst:204:    git merge upstream/master
docs/developing.rst:221:.. _this: https://github.com/ME-ICA/tedana/tree/master/docs
docs/developing.rst:227:.. _`contributing guide`: https://github.com/ME-ICA/tedana/blob/master/CONTRIBUTING.md
docs/governance.rst:184:`decision-making rules for the BIDS standard <https://github.com/bids-standard/bids-specification/blob/master/DECISION-MAKING.md>`_,
docs/governance.rst:299:.. _code of conduct: https://github.com/ME-ICA/tedana/blob/master/CODE_OF_CONDUCT.md
docs/governance.rst:300:.. _all-contributors file: https://github.com/ME-ICA/tedana/blob/master/.all-contributorsrc
docs/index.rst:35:.. image:: https://codecov.io/gh/me-ica/tedana/branch/master/graph/badge.svg
docs/sphinxext/github_link.py:3:https://github.com/scikit-learn/scikit-learn/blob/master/doc/sphinxext/github_link.py
tedana/_version.py:192:        # "stabilization", as well as "HEAD" and "master".
tedana/due.py:13:See  https://github.com/duecredit/duecredit/blob/master/README.md for examples.
versioneer.py:18:(https://travis-ci.org/warner/python-versioneer.png?branch=master)
versioneer.py:179:  "master" and "slave" subprojects, each with their own `setup.py`,
versioneer.py:612:        # "stabilization", as well as "HEAD" and "master".
versioneer.py:1004:        # "stabilization", as well as "HEAD" and "master".

Fortunately it seems that no CI configurations in the repository refer to the branch, however, it's possible we'll need to do some tinkering when we push these changes.

@tsalo
Copy link
Member

tsalo commented Feb 1, 2021

It looks like there was an accidental keyword in #667. Reopening.

@tsalo tsalo pinned this issue Feb 1, 2021
@tsalo
Copy link
Member

tsalo commented Jul 6, 2021

It's been about five months since we made the change, with no issues reported so far. @jbteves do you think we can close this now?

@jbteves
Copy link
Collaborator Author

jbteves commented Jul 12, 2021

I think so, closing.

@jbteves jbteves closed this as completed Jul 12, 2021
@jbteves jbteves unpinned this issue Jul 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
community issues related to building a healthy community discussion issues that still need to be discussed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants