Skip to content

Edit on Github

JuanMa Garrido edited this page Mar 27, 2020 · 11 revisions

Editing a documentation file in our gitbook-docs repository is like editing any other file directly on Github.

1. Find the file you want to edit

In any page of the documentation site, you'll find a link (on the right sidebar) that will take you directly to the corresponding file in the repository.

sidebar-right-documentation

You can also browse directly through this repository until you find the file you'd like to edit.

2. Open the document in the online file editor

In the upper right corner of the file view, click the button with the pencil icon, to open the file editor.

github-edit-button

3. Make your changes in the "Edit file" tab

On the Edit file tab, make any changes you want to make to the file.

github-edit-tab

You can preview your changes by clicking "Preview changes". Take into account that the final style will be given by gitbook but it will use the content and markup set in the file.

4. Propose File Change

At the bottom of the page, type a short, meaningful commit message that describes the change, or changes, that you made to the file (For example → Removed unnecesary characters).

propose-file-change

Click "Propose file change".

You'll also see a message like this... You’re editing a file in a project you don’t have write access to. We've create a fork of this project for you to commit your proposed changes to... Don't worry too much about this message. It's just informing you about all the things that are being done automatically in the background so you can create a Pull Request to suggest your changes.

5. Create Pull Request

Once you click the "Propose file change" you'll be redirected to the "Comparing changes" page. You can see there the detail of the changes you've done compared to the original document

create-pull-request

Click the button "Create pull request" that appears besides the text Discuss and review the changes in this comparison with others

You'll get this other view

create-pull-request-detail

Where you can change the title of the pull request (Removed unnecesary characters in our example) and add any comments regarding your changes, but usually you can just click the Create pull request button.

So... click on "Create pull request"


🎉 Boom! Pull requested created. Now the ball is in our court.

pull-request

We will either accept your changes and merge them with the final version or, if we want to discuss the changes, will start a conversation about them on the Pull Request.