|
| 1 | +# Welcome to GitHub docs contributing guide <!-- omit in toc --> |
| 2 | + |
| 3 | +Thank you for investing your time in contributing to our project! Any contribution you make will be reflected on [docs.github.com](https://docs.github.com/en) :sparkles:. |
| 4 | + |
| 5 | +Read our [Code of Conduct](./CODE_OF_CONDUCT.md) to keep our community approachable and respectable. |
| 6 | + |
| 7 | +In this guide you will get an overview of the contribution workflow from opening an issue, creating a PR, reviewing, and merging the PR. |
| 8 | + |
| 9 | +Use the table of contents icon <img src="./assets/images/table-of-contents.png" width="25" height="25" /> on the top left corner of this document to get to a specific section of this guide quickly. |
| 10 | + |
| 11 | +## New contributor guide |
| 12 | + |
| 13 | +To get an overview of the project, read the [README](README.md). Here are some resources to help you get started with open source contributions: |
| 14 | + |
| 15 | +- [Finding ways to contribute to open source on GitHub](https://docs.github.com/en/get-started/exploring-projects-on-github/finding-ways-to-contribute-to-open-source-on-github) |
| 16 | +- [Set up Git](https://docs.github.com/en/get-started/quickstart/set-up-git) |
| 17 | +- [GitHub flow](https://docs.github.com/en/get-started/quickstart/github-flow) |
| 18 | +- [Collaborating with pull requests](https://docs.github.com/en/github/collaborating-with-pull-requests) |
| 19 | + |
| 20 | + |
| 21 | +## Getting started |
| 22 | + |
| 23 | +To navigate our codebase with confidence, see [the introduction to working in the docs repository](/contributing/working-in-docs-repository.md) :confetti_ball:. For more information on how we write our markdown files, see [the GitHub Markdown reference](contributing/content-markup-reference.md). |
| 24 | + |
| 25 | +Check to see what [types of contributions](/contributing/types-of-contributions.md) we accept before making changes. Some of them don't even require writing a single line of code :sparkles:. |
| 26 | + |
| 27 | +### Issues |
| 28 | + |
| 29 | +#### Create a new issue |
| 30 | + |
| 31 | +If you spot a problem with the docs, [search if an issue already exists](https://docs.github.com/en/github/searching-for-information-on-github/searching-on-github/searching-issues-and-pull-requests#search-by-the-title-body-or-comments). If a related issue doesn't exist, you can open a new issue using a relevant [issue form](https://github.com/github/docs/issues/new/choose). |
| 32 | + |
| 33 | +#### Solve an issue |
| 34 | + |
| 35 | +Scan through our [existing issues](https://github.com/github/docs/issues) to find one that interests you. You can narrow down the search using `labels` as filters. See [Labels](/contributing/how-to-use-labels.md) for more information. As a general rule, we don’t assign issues to anyone. If you find an issue to work on, you are welcome to open a PR with a fix. |
| 36 | + |
| 37 | +### Make Changes |
| 38 | + |
| 39 | +#### Make changes in the UI |
| 40 | + |
| 41 | +Click **Make a contribution** at the bottom of any docs page to make small changes such as a typo, sentence fix, or a broken link. This takes you to the `.md` file where you can make your changes and [create a pull request](#pull-request) for a review. |
| 42 | + |
| 43 | + <img src="./assets/images/contribution_cta.png" width="300" height="150" /> |
| 44 | + |
| 45 | +#### Make changes in a codespace |
| 46 | + |
| 47 | +For more information about using a codespace for working on GitHub documentation, see "[Working in a codespace](https://github.com/github/docs/blob/main/contributing/codespace.md)." |
| 48 | + |
| 49 | +#### Make changes locally |
| 50 | + |
| 51 | +1. [Install Git LFS](https://docs.github.com/en/github/managing-large-files/versioning-large-files/installing-git-large-file-storage). |
| 52 | + |
| 53 | +2. Fork the repository. |
| 54 | +- Using GitHub Desktop: |
| 55 | + - [Getting started with GitHub Desktop](https://docs.github.com/en/desktop/installing-and-configuring-github-desktop/getting-started-with-github-desktop) will guide you through setting up Desktop. |
| 56 | + - Once Desktop is set up, you can use it to [fork the repo](https://docs.github.com/en/desktop/contributing-and-collaborating-using-github-desktop/cloning-and-forking-repositories-from-github-desktop)! |
| 57 | + |
| 58 | +- Using the command line: |
| 59 | + - [Fork the repo](https://docs.github.com/en/github/getting-started-with-github/fork-a-repo#fork-an-example-repository) so that you can make your changes without affecting the original project until you're ready to merge them. |
| 60 | + |
| 61 | +3. Install or update to **Node.js v16**. For more information, see [the development guide](contributing/development.md). |
| 62 | + |
| 63 | +4. Create a working branch and start with your changes! |
| 64 | + |
| 65 | +### Commit your update |
| 66 | + |
| 67 | +Commit the changes once you are happy with them. See [Atom's contributing guide](https://github.com/atom/atom/blob/master/CONTRIBUTING.md#git-commit-messages) to know how to use emoji for commit messages. |
| 68 | + |
| 69 | +Once your changes are ready, don't forget to [self-review](/contributing/self-review.md) to speed up the review process:zap:. |
| 70 | + |
| 71 | +### Pull Request |
| 72 | + |
| 73 | +When you're finished with the changes, create a pull request, also known as a PR. |
| 74 | +- Fill the "Ready for review" template so that we can review your PR. This template helps reviewers understand your changes as well as the purpose of your pull request. |
| 75 | +- Don't forget to [link PR to issue](https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue) if you are solving one. |
| 76 | +- Enable the checkbox to [allow maintainer edits](https://docs.github.com/en/github/collaborating-with-issues-and-pull-requests/allowing-changes-to-a-pull-request-branch-created-from-a-fork) so the branch can be updated for a merge. |
| 77 | +Once you submit your PR, a Docs team member will review your proposal. We may ask questions or request for additional information. |
| 78 | +- We may ask for changes to be made before a PR can be merged, either using [suggested changes](https://docs.github.com/en/github/collaborating-with-issues-and-pull-requests/incorporating-feedback-in-your-pull-request) or pull request comments. You can apply suggested changes directly through the UI. You can make any other changes in your fork, then commit them to your branch. |
| 79 | +- As you update your PR and apply changes, mark each conversation as [resolved](https://docs.github.com/en/github/collaborating-with-issues-and-pull-requests/commenting-on-a-pull-request#resolving-conversations). |
| 80 | +- If you run into any merge issues, checkout this [git tutorial](https://github.com/skills/resolve-merge-conflicts) to help you resolve merge conflicts and other issues. |
| 81 | + |
| 82 | +### Your PR is merged! |
| 83 | + |
| 84 | +Congratulations :tada::tada: The GitHub team thanks you :sparkles:. |
| 85 | + |
| 86 | +Once your PR is merged, your contributions will be publicly visible on the [GitHubs docs](https://docs.github.com/en). |
| 87 | + |
| 88 | +Now that you are part of the GitHub docs community, see how else you can [contribute to the docs](/contributing/types-of-contributions.md). |
| 89 | + |
| 90 | +## Windows |
| 91 | + |
| 92 | +This site can be developed on Windows, however a few potential gotchas need to be kept in mind: |
| 93 | + |
| 94 | +1. Regular Expressions: Windows uses `\r\n` for line endings, while Unix based systems use `\n`. Therefore when working on Regular Expressions, use `\r?\n` instead of `\n` in order to support both environments. The Node.js [`os.EOL`](https://nodejs.org/api/os.html#os_os_eol) property can be used to get an OS-specific end-of-line marker. |
| 95 | +2. Paths: Windows systems use `\` for the path separator, which would be returned by `path.join` and others. You could use `path.posix`, `path.posix.join` etc and the [slash](https://ghub.io/slash) module, if you need forward slashes - like for constructing URLs - or ensure your code works with either. |
| 96 | +3. Bash: Not every Windows developer has a terminal that fully supports Bash, so it's generally preferred to write [scripts](/script) in JavaScript instead of Bash. |
| 97 | +4. Filename too long error: There is a 260 character limit for a filename when Git is compiled with `msys`. While the suggestions below are not guaranteed to work and could possibly cause other issues, a few workarounds include: |
| 98 | + - Update Git configuration: `git config --system core.longpaths true` |
| 99 | + - Consider using a different Git client on Windows |
0 commit comments