Skip to content

Commit

Permalink
add update guidance
Browse files Browse the repository at this point in the history
  • Loading branch information
akcano committed Feb 17, 2025
1 parent 13d0cbd commit 0ab8ac3
Show file tree
Hide file tree
Showing 2 changed files with 63 additions and 0 deletions.
62 changes: 62 additions & 0 deletions docs/content/update-starter-pack.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
.. _update-sp:

Update the starter pack
=======================

This section describes the ways to update the starter pack.
Several options exist.


With ``make update`` (recommended)
----------------------------------

This suits most scenarios.
Run ``make update`` to sync the latest updates from the starter pack repository::

make update


This does not affect the files that you may have customised in your project::

content/*
reuse/*
.custom_wordlist.txt
conf.py
index.rst


Any updates to these files done in the upstream version of the starter pack
must be added manually.


With ``git merge``
------------------

This should be used only if you have many fine-grained differences
between your installation and the starter pack
that you want to cherry-pick.
You need to feel confident using git and doing merges.

Add the starter pack repository as a remote and fetch it::

git remote add starter-pack https://github.com/canonical/sphinx-docs-starter-pack.git
git fetch starter-pack


Next, merge the updates from the starter pack, resolving any arising conflicts::

git merge --no-commit --no-ff --allow-unrelated-histories starter-pack/main



.. attention::

The `--allow-unrelated-histories
<https://git-scm.com/docs/git-merge#Documentation/git-merge.txt---allow-unrelated-histories>`_
option can be tricky; proceed with caution.


Finally, commit the updates::

git add .
git commit -m "Synced latest updates from starter-pack/main"
1 change: 1 addition & 0 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,6 @@ It contains common styling and configuration through the `Canonical Sphinx`_ ext
/content/customise
/content/rtd
/content/update
/content/update-starter-pack
/content/automatic_checks
/content/contributing

0 comments on commit 0ab8ac3

Please sign in to comment.