docs: master -> main (#40857)
Updates the docs to reflect the change from `master` to `main` as our primary branch. Signed-off-by: nhcarrigan <nhcarrigan@gmail.com>
This commit is contained in:
committed by
GitHub
parent
a37d5f5817
commit
e5b43edf84
@ -10,13 +10,13 @@ This repository is continuously built, tested and deployed to **separate sets of
|
||||
|
||||
This involves three steps to be followed in sequence:
|
||||
|
||||
1. New changes (both fixes and features) are merged into our primary development branch (`master`) via pull requests.
|
||||
1. New changes (both fixes and features) are merged into our primary development branch (`main`) via pull requests.
|
||||
2. These changes are run through a series of automated tests.
|
||||
3. Once the tests pass we release the changes (or update them if needed) to deployments on our infrastructure.
|
||||
|
||||
#### Building the codebase - Mapping Git Branches to Deployments.
|
||||
|
||||
Typically, [`master`](https://github.com/freeCodeCamp/freeCodeCamp/tree/master) (the default development branch) is merged into the [`production-staging`](https://github.com/freeCodeCamp/freeCodeCamp/tree/production-staging) branch once a day and is released into an isolated infrastructure.
|
||||
Typically, [`main`](https://github.com/freeCodeCamp/freeCodeCamp/tree/main) (the default development branch) is merged into the [`production-staging`](https://github.com/freeCodeCamp/freeCodeCamp/tree/production-staging) branch once a day and is released into an isolated infrastructure.
|
||||
|
||||
This is an intermediate release for our developers and volunteer contributors. It is also known as our "staging" or "beta" release.
|
||||
|
||||
@ -71,24 +71,24 @@ Currently, only members on the developer team can push to the production branche
|
||||
upstream git@github.com:freeCodeCamp/freeCodeCamp.git (push)
|
||||
```
|
||||
|
||||
2. Make sure your `master` branch is pristine and in sync with the upstream.
|
||||
2. Make sure your `maim` branch is pristine and in sync with the upstream.
|
||||
|
||||
```sh
|
||||
git checkout master
|
||||
git checkout main
|
||||
git fetch --all --prune
|
||||
git reset --hard upstream/master
|
||||
git reset --hard upstream/main
|
||||
```
|
||||
|
||||
3. Check that the GitHub CI is passing on the `master` branch for upstream.
|
||||
3. Check that the GitHub CI is passing on the `main` branch for upstream.
|
||||
|
||||
The [continuous integration](https://github.com/freeCodeCamp/freeCodeCamp/actions) tests should be green and PASSING for the `master` branch. Click the green check mark next to the commit hash when viewing the `master` branch code.
|
||||
The [continuous integration](https://github.com/freeCodeCamp/freeCodeCamp/actions) tests should be green and PASSING for the `main` branch. Click the green check mark next to the commit hash when viewing the `main` branch code.
|
||||
|
||||
<details>
|
||||
<summary>
|
||||
Checking status on GitHub Actions (screenshot)
|
||||
</summary>
|
||||
<br>
|
||||
<img src="https://raw.githubusercontent.com/freeCodeCamp/freeCodeCamp/master/docs/images/devops/github-actions.png" alt="Check build status on GitHub Actions">
|
||||
<img src="https://raw.githubusercontent.com/freeCodeCamp/freeCodeCamp/main/docs/images/devops/github-actions.png" alt="Check build status on GitHub Actions">
|
||||
</details>
|
||||
|
||||
If this is failing you should stop and investigate the errors.
|
||||
@ -99,11 +99,11 @@ Currently, only members on the developer team can push to the production branche
|
||||
npm run clean-and-develop
|
||||
```
|
||||
|
||||
5. Move changes from `master` to `production-staging` via a fast-forward merge
|
||||
5. Move changes from `main` to `production-staging` via a fast-forward merge
|
||||
|
||||
```
|
||||
git checkout production-staging
|
||||
git merge master
|
||||
git merge main
|
||||
git push upstream
|
||||
```
|
||||
|
||||
@ -176,8 +176,6 @@ Here is the current test, build and deployment status of the codebase.
|
||||
|
||||
| Type | Branch | Status | Dashboard |
|
||||
| :--------------- | :------------------------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :---------------------------------------------------------------------------------------- |
|
||||
| CI Tests | [`master`](https://github.com/freeCodeCamp/freeCodeCamp/tree/master) |  | [Go to status dashboard](https://travis-ci.com/github/freeCodeCamp/freeCodeCamp/branches) |
|
||||
| CI Tests | [`production-staging`](https://github.com/freeCodeCamp/freeCodeCamp/tree/production-staging) |  | [Go to status dashboard](https://travis-ci.com/github/freeCodeCamp/freeCodeCamp/branches) |
|
||||
| Build Pipeline | [`production-staging`](https://github.com/freeCodeCamp/freeCodeCamp/tree/production-staging) | [](https://dev.azure.com/freeCodeCamp-org/freeCodeCamp/_build/latest?definitionId=15&branchName=production-staging) | [Go to status dashboard](https://dev.azure.com/freeCodeCamp-org/freeCodeCamp/_build) |
|
||||
| Release Pipeline | [`production-staging`](https://github.com/freeCodeCamp/freeCodeCamp/tree/production-staging) | | [Go to status dashboard](https://dev.azure.com/freeCodeCamp-org/freeCodeCamp/_release) |
|
||||
| CI Tests | [`production-current`](https://github.com/freeCodeCamp/freeCodeCamp/tree/production-current) |  | [Go to status dashboard](https://travis-ci.com/github/freeCodeCamp/freeCodeCamp/branches) |
|
||||
@ -528,7 +526,7 @@ sudo su
|
||||
```console
|
||||
cd /etc/nginx
|
||||
git fetch --all --prune
|
||||
git reset --hard origin/master
|
||||
git reset --hard origin/main
|
||||
```
|
||||
|
||||
3. Test and reload the config
|
||||
|
@ -64,10 +64,10 @@ The number for the correct answer goes here.
|
||||
|
||||
You can find the markdown files for video challenges at the following locations in the curriculum:
|
||||
|
||||
- [Data Analysis with Python Course](https://github.com/freeCodeCamp/freeCodeCamp/tree/master/curriculum/challenges/english/08-data-analysis-with-python/data-analysis-with-python-course)
|
||||
- [TensorFlow 2.0 Course](https://github.com/freeCodeCamp/freeCodeCamp/tree/master/curriculum/challenges/english/11-machine-learning-with-python/tensorflow)
|
||||
- [Numpy Course](https://github.com/freeCodeCamp/freeCodeCamp/tree/master/curriculum/challenges/english/08-data-analysis-with-python/numpy)
|
||||
- [How Neural Networks Work Course](https://github.com/freeCodeCamp/freeCodeCamp/tree/master/curriculum/challenges/english/11-machine-learning-with-python/how-neural-networks-work)
|
||||
- [Data Analysis with Python Course](https://github.com/freeCodeCamp/freeCodeCamp/tree/main/curriculum/challenges/english/08-data-analysis-with-python/data-analysis-with-python-course)
|
||||
- [TensorFlow 2.0 Course](https://github.com/freeCodeCamp/freeCodeCamp/tree/main/curriculum/challenges/english/11-machine-learning-with-python/tensorflow)
|
||||
- [Numpy Course](https://github.com/freeCodeCamp/freeCodeCamp/tree/main/curriculum/challenges/english/08-data-analysis-with-python/numpy)
|
||||
- [How Neural Networks Work Course](https://github.com/freeCodeCamp/freeCodeCamp/tree/main/curriculum/challenges/english/11-machine-learning-with-python/how-neural-networks-work)
|
||||
|
||||
Pick a challenge markdown file from the options above.
|
||||
|
||||
@ -192,7 +192,7 @@ print(height/3)
|
||||
3
|
||||
````
|
||||
|
||||
For more examples, you can look at the markdown files for the following video course. All the challenges already have questions: [Python for Everybody Course](https://github.com/freeCodeCamp/freeCodeCamp/tree/master/curriculum/challenges/english/07-scientific-computing-with-python/python-for-everybody)
|
||||
For more examples, you can look at the markdown files for the following video course. All the challenges already have questions: [Python for Everybody Course](https://github.com/freeCodeCamp/freeCodeCamp/tree/main/curriculum/challenges/english/07-scientific-computing-with-python/python-for-everybody)
|
||||
|
||||
## Open a pull request
|
||||
|
||||
|
@ -44,13 +44,13 @@ Some examples of good PRs titles would be:
|
||||
|
||||

|
||||
|
||||
2. By default, all pull requests should be against the freeCodeCamp main repo, `master` branch.
|
||||
2. By default, all pull requests should be against the freeCodeCamp main repo, `main` branch.
|
||||
|
||||
Make sure that your Base Fork is set to freeCodeCamp/freeCodeCamp when raising a Pull Request.
|
||||
|
||||

|
||||
|
||||
3. Submit the pull request from your branch to freeCodeCamp's `master` branch.
|
||||
3. Submit the pull request from your branch to freeCodeCamp's `main` branch.
|
||||
|
||||
4. In the body of your PR include a more detailed summary of the changes you made and why.
|
||||
|
||||
@ -88,13 +88,13 @@ More often than not you may not require a rebase, because we squash all commits,
|
||||
|
||||
### For usual bug fixes and features
|
||||
|
||||
When you are working on regular bugs and features on our development branch `master`, you are able to do a simple rebase:
|
||||
When you are working on regular bugs and features on our development branch `main`, you are able to do a simple rebase:
|
||||
|
||||
1. Rebase your local copy:
|
||||
|
||||
```console
|
||||
git checkout <pr-branch>
|
||||
git pull --rebase upstream master
|
||||
git pull --rebase upstream main
|
||||
```
|
||||
|
||||
2. Resolve any conflicts and add / edit commits
|
||||
@ -122,7 +122,7 @@ When you are working on features for our upcoming curriculum `next-*` branches,
|
||||
1. Make sure your upstream comes in sync with your local:
|
||||
|
||||
```console
|
||||
git checkout master
|
||||
git checkout main
|
||||
git fetch --all --prune
|
||||
git checkout next-python-projects
|
||||
git reset --hard upstream/next-python-projects
|
||||
|
@ -83,7 +83,7 @@ This is essential, as it allows you to work on your own copy of freeCodeCamp on
|
||||
How to fork freeCodeCamp on GitHub (screenshot)
|
||||
</summary>
|
||||
<br>
|
||||
<img src="https://raw.githubusercontent.com/freeCodeCamp/freeCodeCamp/master/docs/images/github/how-to-fork-freeCodeCamp.gif" alt="How to fork freeCodeCamp on GitHub">
|
||||
<img src="https://raw.githubusercontent.com/freeCodeCamp/freeCodeCamp/main/docs/images/github/how-to-fork-freeCodeCamp.gif" alt="How to fork freeCodeCamp on GitHub">
|
||||
</details>
|
||||
|
||||
## Clone your fork from GitHub
|
||||
@ -268,7 +268,7 @@ You can now make changes to files and commit your changes to your local clone of
|
||||
|
||||
Follow these steps:
|
||||
|
||||
1. Validate that you are on the `master` branch:
|
||||
1. Validate that you are on the `main` branch:
|
||||
|
||||
```console
|
||||
git status
|
||||
@ -277,26 +277,26 @@ Follow these steps:
|
||||
You should get an output like this:
|
||||
|
||||
```console
|
||||
On branch master
|
||||
Your branch is up-to-date with 'origin/master'.
|
||||
On branch main
|
||||
Your branch is up-to-date with 'origin/main'.
|
||||
|
||||
nothing to commit, working directory clean
|
||||
```
|
||||
|
||||
If you are not on master or your working directory is not clean, resolve any outstanding files/commits and checkout `master`:
|
||||
If you are not on main or your working directory is not clean, resolve any outstanding files/commits and checkout `main`:
|
||||
|
||||
```console
|
||||
git checkout master
|
||||
git checkout main
|
||||
```
|
||||
|
||||
2. Sync the latest changes from the freeCodeCamp upstream `master` branch to your local master branch:
|
||||
2. Sync the latest changes from the freeCodeCamp upstream `main` branch to your local main branch:
|
||||
|
||||
> [!WARNING]
|
||||
> If you have any outstanding pull request that you made from the `master` branch of your fork, you will lose them at the end of this step.
|
||||
> If you have any outstanding pull request that you made from the `main` branch of your fork, you will lose them at the end of this step.
|
||||
>
|
||||
> You should ensure your pull request is merged by a moderator before performing this step. To avoid this scenario, you should **always** work on a branch other than the `master`.
|
||||
> You should ensure your pull request is merged by a moderator before performing this step. To avoid this scenario, you should **always** work on a branch other than the `main`.
|
||||
|
||||
This step **will sync the latest changes** from the main repository of freeCodeCamp. It is important that you rebase your branch on top of the latest `upstream/master` as often as possible to avoid conflicts later.
|
||||
This step **will sync the latest changes** from the main repository of freeCodeCamp. It is important that you rebase your branch on top of the latest `upstream/main` as often as possible to avoid conflicts later.
|
||||
|
||||
Update your local copy of the freeCodeCamp upstream repository:
|
||||
|
||||
@ -304,31 +304,31 @@ Follow these steps:
|
||||
git fetch upstream
|
||||
```
|
||||
|
||||
Hard reset your master branch with the freeCodeCamp master:
|
||||
Hard reset your main branch with the freeCodeCamp main:
|
||||
|
||||
```console
|
||||
git reset --hard upstream/master
|
||||
git reset --hard upstream/main
|
||||
```
|
||||
|
||||
Push your master branch to your origin to have a clean history on your fork on GitHub:
|
||||
Push your main branch to your origin to have a clean history on your fork on GitHub:
|
||||
|
||||
```console
|
||||
git push origin master --force
|
||||
git push origin main --force
|
||||
```
|
||||
|
||||
You can validate your current master matches the upstream/master by performing a diff:
|
||||
You can validate your current main matches the upstream/main by performing a diff:
|
||||
|
||||
```console
|
||||
git diff upstream/master
|
||||
git diff upstream/main
|
||||
```
|
||||
|
||||
The resulting output should be empty.
|
||||
|
||||
3. Create a fresh new branch:
|
||||
|
||||
Working on a separate branch for each issue helps you keep your local work copy clean. You should never work on the `master`. This will soil your copy of freeCodeCamp and you may have to start over with a fresh clone or fork.
|
||||
Working on a separate branch for each issue helps you keep your local work copy clean. You should never work on the `main`. This will soil your copy of freeCodeCamp and you may have to start over with a fresh clone or fork.
|
||||
|
||||
Check that you are on `master` as explained previously, and branch off from there:
|
||||
Check that you are on `main` as explained previously, and branch off from there:
|
||||
|
||||
```console
|
||||
git checkout -b fix/update-guide-for-xyz
|
||||
|
@ -16,7 +16,7 @@ With your help we can design an interactive coding curriculum that will help mil
|
||||
|
||||
The content for each challenge is stored in its own markdown file. This markdown file is later converted to HTML using our tools to create interactive web pages.
|
||||
|
||||
You can find all of freeCodeCamp.org's curricular content in the [`/curriculum/challenges`](https://github.com/freeCodeCamp/freeCodeCamp/tree/master/curriculum/challenges) directory.
|
||||
You can find all of freeCodeCamp.org's curricular content in the [`/curriculum/challenges`](https://github.com/freeCodeCamp/freeCodeCamp/tree/main/curriculum/challenges) directory.
|
||||
|
||||
## Set up the tooling for the curriculum
|
||||
|
||||
@ -478,7 +478,7 @@ You are also able to test one challenge individually by performing the following
|
||||
npm run test -- -g 'the full English title of the challenge'
|
||||
```
|
||||
|
||||
Once you have verified that each challenge you've worked on passes the tests, [please create a pull request](https://github.com/freeCodeCamp/freeCodeCamp/blob/master/docs/how-to-open-a-pull-request.md).
|
||||
Once you have verified that each challenge you've worked on passes the tests, [please create a pull request](https://github.com/freeCodeCamp/freeCodeCamp/blob/main/docs/how-to-open-a-pull-request.md).
|
||||
|
||||
> [!TIP]
|
||||
> You can set the environment variable `LOCALE` in the `.env` to the language of the challenge(s) you need to test.
|
||||
@ -489,6 +489,6 @@ Once you have verified that each challenge you've worked on passes the tests, [p
|
||||
|
||||
Creating and Editing Challenges:
|
||||
|
||||
1. [Challenge types](https://github.com/freeCodeCamp/freeCodeCamp/blob/master/client/utils/challengeTypes.js#L1-L13) - what the numeric challenge type values mean (enum).
|
||||
1. [Challenge types](https://github.com/freeCodeCamp/freeCodeCamp/blob/main/client/utils/challengeTypes.js#L1-L13) - what the numeric challenge type values mean (enum).
|
||||
|
||||
2. [Contributing to FreeCodeCamp - Writing ES6 Challenge Tests](https://www.youtube.com/watch?v=iOdD84OSfAE#t=2h49m55s) - a video following [Ethan Arrowood](https://twitter.com/ArrowoodTech) as he contributes to the old version of the curriculum.
|
||||
|
@ -3,7 +3,7 @@
|
||||
> [!NOTE]
|
||||
> A quick reminder that you do not need to setup anything for working on the content for the documentation site.
|
||||
>
|
||||
> To work on the contributing guidelines, you can edit or add files in the `docs` directory [available here](https://github.com/freeCodeCamp/freeCodeCamp/tree/master/docs). When your changes are merged, it will be made available automatically at the documentation site.
|
||||
> To work on the contributing guidelines, you can edit or add files in the `docs` directory [available here](https://github.com/freeCodeCamp/freeCodeCamp/tree/main/docs). When your changes are merged, it will be made available automatically at the documentation site.
|
||||
|
||||
## Structure of the docs website
|
||||
|
||||
|
Reference in New Issue
Block a user