mirror of
https://github.com/TeachBooks/template.git
synced 2026-11-12 22:25:52 +00:00
2.5 KiB
2.5 KiB
Exercise 4: Your Version of the Book
By now, we've covered the essentials: content files, _toc.yml and _config.yml. But what if you want to make some changes but don't want to share them directly with the general public of your book website? Or what if you have some work-in-progress that you want to share with colleagues? You need a version of your book! Let's try and do that! Later on, you'll probably want to merge your newest version back into the original book. That's what we'll do in .
::::::{topic} Exercise objective
Can you make a new branch of your book with an additional file file_on_new_version.md and view it online?
::::::
- Add a new Issue to let people know you're working on something by going to your repository - {octicon}
issue-opened;1emIssues-New issue(note that is not required for making your own version, but it's good practice so that people know where you're working on) - Add a title and description, eg.
Added some content - On
Assignees, clickAssign yourselfto make clear that you feel responsible for this issue. - Click
Create - In the new window (inside your just created issue), under
Development, clickCreate a branch(note that you could also make branches in other ways, but in this way it's directly linked to the issue). A 'branch' is a separate version of the book which keeps the link with the original book. - Use the default options and click
Create branch - Ignore the
checkout in your local repository- popup for now (later on you'll know what this is and how to use it) - Go to
Code- {octicon}git-branch;1emmainand click on1-<your_issue_title>to open your branch. - Add a book page as explained in and make sure you commit to the
1-<your_issue_title>-branch. - Go to {octicon}
play;1emActions- The most recent workflow runUpdate _toc.yml / the commit message of the commit you just made- Wait for it to finish - In the summary, you should now see multiple Branches. Click on the link of your new branch ``1-<your_issue_title>` - Do you see your change? If you don't see it click
CTRL+F5/Control+F5to refresh the page.
:class: note
Before moving on to the next exercise, make sure you understand the following:
- What is the purpose of creating a new branch in your repository?
- Why is it good practice to create an issue before starting work on a new feature or change?
- How can you view the changes made in your new branch online?