About GitHub Codespaces
GitHub Codespaces allows you to work in a development environment that's hosted remotely from your machine. You can get started quickly, without needing to set up the working environment or download files to your local computer.
For more information, see "GitHub Codespaces overview."
Working on documentation in a codespace
The following steps assume you have GitHub Codespaces set up to edit files using Visual Studio Code for Web. The steps are very similar if you have set a different editor. For more information, see "Setting your default editor for GitHub Codespaces."
-
Navigate to the open source repository for GitHub Docs,
github/docs
. -
If you're an open source contributor, create a fork of the repository, then follow the rest of the steps in this procedure from your fork. For more information, see "Fork a repository."
-
Create a branch to work on. For more information, see "Creating and deleting branches within your repository."
-
On the main page of the repository, click Code, then click Create codespace on BRANCH-NAME.
The "Setting up your codespace" page is displayed. After a short time the browser-based version of Visual Studio Code is displayed.
-
Use the Explorer to navigate to the markdown file you want to edit. If the file is an article, it will be located in the
content
directory. If the file is reusable content, it will be located in thedata
directory.In most cases, the path to an article in the
content
directory matches the path in the URL, minus the.md
file extension. For example, the source for the articlehttps://docs.github.com/en/codespaces/getting-started/quickstart
is the markdown filecontent/codespaces/getting-started/quickstart.md
. -
Edit the markdown file as required.
-
Save your changes.
-
Commit and push your changes, either using the Source Control view, or using Git commands from the Terminal. For more information, see "About Git."
Creating a pull request
-
Navigate to the "Pull requests" tab of the
github/docs
repository at github.com/github/docs/pulls. -
Click New pull request.
-
If you're an open source contributor, click compare across forks, then choose the forked repository you created and your working branch.
Otherwise, change the "compare" branch to your working branch.
-
Check that the changes displayed include all of the changes you made in the codespace. If they do not, this may indicate there are changes you have not pushed from the codespace to GitHub.
-
Click Create pull request.
-
Enter the details for your pull request and click Create pull request.
Your pull request will be reviewed by a member of the GitHub Docs team.