-
Notifications
You must be signed in to change notification settings - Fork 6
Making changes to published guides
Laura Cowen edited this page Nov 22, 2017
·
9 revisions
- On the GitHub.com website, fork the repository of the guide you want to edit:
- Log into your GitHub.com account.
- Find the repository for the guide (I'm using the REST guide as an example here).
- At the top of the page, click the Fork button. This creates a copy of the repository in your account. (Find out more about forks.)
- Clone the forked repository to your machine. In the terminal:
git clone https://github.com/lauracowen/guide-rest-intro.git
(replace this URL with the URL you get when you click the green Clone or download button on the repository's webpage). You should now have a directory calledguide-rest-intro
in your current location (/Users/laura/github/openliberty/openliberty.io/src/main/content/guides
). - In the terminal:
cd guide-rest-intro
. This is the guide. TheREADME.adoc
file contains the guide text. - Edit the README.adoc file using Asciidoc.
- Test your changes:
- At minimum, run Asciidoctor against the README.adoc file to generate the HTML version. Doing this checks that the file transforms to HTML and none of the tagging is broken. But the formatting and style won't look exactly like the end result.
- Ideally, check the guide in a local test website. Doing this shows you the formatting and style of the end result.
When you're happy with how your changes look in the test site, you can create a pull request to push them back to the main GitHub repository.
- In a terminal in the guide you've been changing (e.g.
/Users/laura/github/openliberty/openliberty.io/src/main/content/guides/guide-rest-intro
), check the changes:git status
TheREADME.adoc
file should be listed as 'modified'. - Add the file to be committed:
git add README.adoc
- Commit the file in your local git version control:
git commit
then enter a description (or list) of why you made the changes (the changes themselves can be easily seen; a good commit message describes why). If you can't handle the default text editor, instead use the commandgit commit -m type_your_commit_message_here
but you can only provide a single line this way. - Create a new branch in your account:
git checkout -b branch_name
(where branch_name is your initials and a brief name for the branch; e.g.ljc_fixedtypos
). - Push the changes to GitHub:
git push origin ljc_fixedtypos
The file is now updated in your fork (copy) of the guide repository on GitHub.com. Click the Branch button on the repository page to switch frommaster
to your new branch to see the changes. - Create a pull request to the guide's repository, e.g.
openliberty/guide-rest-intro
: - On the repository page in your account (eg https://github.com/lauracowen/guide-rest-intro), click New Pull Request.
- Make sure the settings are
base fork: OpenLiberty/guide-rest-intro
,base: master
,head fork: lauracowen/guide-rest-intro
,base: ljc_fixedtypos
. - Check that the correct file and changes are included in the pull request, then enter a description of the changes you've made in the pull request.
- Add a reviewer to the pull request.
- Submit the pull request.
- Optionally, link your pull request to the issue(s) that it resolves. Feel free to create new issues as appropriate.
The reviewer will then be notified to review the changes. They might ask you to make some modifications. If they do, just make your changes locally and go through the git add
, git commit
, git push
steps again (use the same branch). I think the PR is automatically updated to include the changes...[check this]. When the reviewer is happy, they'll merge your changes into the master
branch of the guide. Next time the guide is built, the changes will be incorporated into the live website at http://openliberty.io/guides
. And you're done!