docs: add pr conflict guidelines (#38686)
This commit is contained in:
committed by
GitHub
parent
4a07964c79
commit
54bf2074e4
@ -76,7 +76,7 @@ https://www.youtube.com/watch?v=[videoId] (add in the videoId to the URL)
|
|||||||
|
|
||||||
In the example above, the url is https://www.youtube.com/watch?v=nVAaxZ34khk .
|
In the example above, the url is https://www.youtube.com/watch?v=nVAaxZ34khk .
|
||||||
|
|
||||||
Skim the YouTube video with that videoId and think of a multiple choice question based on the content of the video.
|
Skim the YouTube video with that videoId and think of a multiple choice question based on the content of the video.
|
||||||
|
|
||||||
### Add the question to the markdown file
|
### Add the question to the markdown file
|
||||||
|
|
||||||
@ -98,7 +98,7 @@ Update the word “Question” with your question. Update the “one”, “two
|
|||||||
|
|
||||||
Questions and answers can contain certain HTML tags like `<br>` for a new line. Surround code with `<pre></pre>` You will need to add a `<br>` at the end of each line of code.
|
Questions and answers can contain certain HTML tags like `<br>` for a new line. Surround code with `<pre></pre>` You will need to add a `<br>` at the end of each line of code.
|
||||||
|
|
||||||
Make sure each answer is plausible but there is only one correct answer.
|
Make sure each answer is plausible but there is only one correct answer.
|
||||||
|
|
||||||
## Question examples
|
## Question examples
|
||||||
|
|
||||||
@ -140,4 +140,4 @@ For more examples, you can look at the markdown files for the following video co
|
|||||||
|
|
||||||
## Open a pull request
|
## Open a pull request
|
||||||
|
|
||||||
After creating one or more questions, you can commit the changes to a new branch and open a pull request. Make sure that you target the branch 'next-python-projects' and NOT 'master'.
|
After creating one or more questions, you can commit the changes to a new branch and [open a pull request](how-to-open-a-pull-request.md). Make sure that you target the branch 'next-python-projects' and NOT 'master'.
|
||||||
|
@ -66,3 +66,116 @@ Some examples of good PRs titles would be:
|
|||||||
5. Indicate if you have tested on a local copy of the site or not.
|
5. Indicate if you have tested on a local copy of the site or not.
|
||||||
|
|
||||||
This is very important when making changes that are not just edits to text content like documentation or a challenge description. Examples of changes that need local testing include JavaScript, CSS, or HTML which could change the functionality or layout of a page.
|
This is very important when making changes that are not just edits to text content like documentation or a challenge description. Examples of changes that need local testing include JavaScript, CSS, or HTML which could change the functionality or layout of a page.
|
||||||
|
|
||||||
|
## Feedback on pull requests
|
||||||
|
|
||||||
|
> Congratulations! :tada: on making a PR and thanks a lot for taking the time to contribute.
|
||||||
|
|
||||||
|
Our moderators will now take a look and leave you feedback. Please be patient with the fellow moderators and respect their time. All pull requests are reviewed in due course.
|
||||||
|
|
||||||
|
If you need any assistance please disscuss in the [contributors chat room](https://gitter.im/FreeCodeCamp/Contributors), we are more than happy to help you.
|
||||||
|
|
||||||
|
> [!TIP]
|
||||||
|
> If you are to be contributing more pull requests, we recommend you read the [making changes and syncing](http://localhost:3000/#/how-to-setup-freecodecamp-locally?id=making-changes-locally) guidelines to avoid having to delete your fork.
|
||||||
|
|
||||||
|
## Conflicts on a pull request
|
||||||
|
|
||||||
|
Conflicts can arise because many contributors work on the repository, and changes can break your PR which is pending a review and merge.
|
||||||
|
|
||||||
|
More often than not you may not require a rebase, because we squash all commits, however if a rebase is requested here is what you should do.
|
||||||
|
|
||||||
|
### 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:
|
||||||
|
|
||||||
|
1. Rebase your local copy:
|
||||||
|
|
||||||
|
```console
|
||||||
|
git checkout <pr-branch>
|
||||||
|
git pull --rebase upstream master
|
||||||
|
```
|
||||||
|
|
||||||
|
2. Resolve any conflicts and add / edit commits
|
||||||
|
|
||||||
|
```console
|
||||||
|
# Either
|
||||||
|
git add .
|
||||||
|
git commit -m "chore: resolve conflicts"
|
||||||
|
|
||||||
|
# Or
|
||||||
|
git add .
|
||||||
|
git commit --amend --no-edit
|
||||||
|
```
|
||||||
|
|
||||||
|
3. Push back your changes to the PR
|
||||||
|
|
||||||
|
```console
|
||||||
|
git push --force origin <pr-branch>
|
||||||
|
```
|
||||||
|
|
||||||
|
### For upcoming curriculum and features
|
||||||
|
|
||||||
|
When you are working on features for our upcoming curriculum `next-*` branches, you have do a cherry pick:
|
||||||
|
|
||||||
|
1. Make sure your upstream comes in sync with your local:
|
||||||
|
|
||||||
|
```console
|
||||||
|
git checkout master
|
||||||
|
git fetch --all --prune
|
||||||
|
git checkout next-python-projects
|
||||||
|
git reset --hard upstream/next-python-projects
|
||||||
|
```
|
||||||
|
|
||||||
|
2. Take backup
|
||||||
|
|
||||||
|
a. Either delete your local branch after taking a backup (if you still have it locally):
|
||||||
|
|
||||||
|
```console
|
||||||
|
git checkout <pr-branch-name>
|
||||||
|
|
||||||
|
# example:
|
||||||
|
# git checkout feat/add-numpy-video-question
|
||||||
|
|
||||||
|
git checkout -b <backup-branch-name>
|
||||||
|
|
||||||
|
# example:
|
||||||
|
# git checkout -b backup-feat/add-numpy-video-question
|
||||||
|
|
||||||
|
git branch -D <pr-branch-name>
|
||||||
|
```
|
||||||
|
|
||||||
|
b. Or just a backup of your pr branch (if you do not have it locally):
|
||||||
|
|
||||||
|
```console
|
||||||
|
git checkout -b <backup-branch-name> origin/<pr-branch-name>
|
||||||
|
|
||||||
|
# example:
|
||||||
|
# git checkout -b backup-feat/add-numpy-video-question origin/feat/add-numpy-video-question
|
||||||
|
```
|
||||||
|
|
||||||
|
4. Start off with a clean slate:
|
||||||
|
|
||||||
|
```console
|
||||||
|
git checkout -b <pr-branch-name> next-python-projects
|
||||||
|
git cherry-pick <commit-hash>
|
||||||
|
```
|
||||||
|
|
||||||
|
5. Resolve any conflicts, and cleanup, install run tests
|
||||||
|
|
||||||
|
```console
|
||||||
|
npm run clean
|
||||||
|
|
||||||
|
npm run ci
|
||||||
|
npm run test:curriculum --superblock=<superblock-name>
|
||||||
|
|
||||||
|
# example:
|
||||||
|
|
||||||
|
# npm run test:curriculum --superblock=python-for-everybody
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
|
6. If everything looks good push back to the PR
|
||||||
|
|
||||||
|
```console
|
||||||
|
git push --force origin <pr-branch-name>
|
||||||
|
```
|
||||||
|
Reference in New Issue
Block a user