Skip to content

Commit f0f91bb

Browse files
authored
Merge branch '6.0' into container-recipes-zodb-pack-follow-up
2 parents 46b5d64 + 1db87bc commit f0f91bb

File tree

3 files changed

+52
-0
lines changed

3 files changed

+52
-0
lines changed
Loading

docs/conf.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,7 @@
158158
suppress_warnings = [
159159
# "toc.excluded", # Suppress `WARNING: document isn't included in any toctree`
160160
"toc.not_readable", # Suppress `WARNING: toctree contains reference to nonexisting document 'news*'`
161+
"myst.strikethrough", # Suppress `WARNING: Strikethrough is currently only supported in HTML output [myst.strikethrough]`
161162
]
162163

163164

@@ -310,6 +311,7 @@
310311
"substitution", # plone.restapi \
311312
# https://myst-parser.readthedocs.io/en/latest/syntax/optional.html#substitutions-with-jinja2
312313
"html_image", # For inline images. See https://myst-parser.readthedocs.io/en/latest/syntax/optional.html#html-images
314+
"strikethrough", # See https://myst-parser.readthedocs.io/en/latest/syntax/optional.html#syntax-strikethrough
313315
]
314316

315317
myst_substitutions = {

docs/contributing/documentation/index.md

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,56 @@ This practice differs according to the repository's files that you edit.
129129
You can then edit the documentation of either Plone in the primary repository or any of the other projects in their folder inside the {file}`/submodules` folder.
130130
131131
132+
### Git submodules
133+
134+
```{danger}
135+
Every time you commit a git submodule, your deity kills a kitten.
136+
```
137+
138+
```{image} /_static/contributing/git-commit-submodule.jpg
139+
:alt: Two furry brown brick characters with stubby arms and legs and razor sharp teeth chase an adorable kitten across a lush green lawn to its ultimate demise.
140+
```
141+
142+
Please save teh kittehs!
143+
Never commit a git submodule.
144+
145+
If you mistakenly ~~kill a kitten~~ commit a git submodule, then you can ~~time travel~~ revert the commit, depending on whether it was the most recent commit or earlier.
146+
Use one of the following processes for what works best in your situation.
147+
148+
If it was in your most recent commit, use the following.
149+
This command will also revert all other changes in the commit.
150+
151+
```shell
152+
git reset --hard HEAD~1
153+
```
154+
155+
If it was an earlier commit, use the following process.
156+
Check out only the submodule folder to a specific commit or remote branch where the folder's changes are not committed.
157+
158+
```shell
159+
git fetch
160+
git checkout <remote>/<branch> -- <submodule-folder>
161+
```
162+
163+
Alternatively, use the log to copy the commit hash, and use that to check out that hash for your submodule folder.
164+
165+
```shell
166+
git log
167+
git checkout <commit-hash> -- <submodule-folder>
168+
```
169+
170+
Finally, to force your cloned repository to use the same submodule as the upstream, pull the changes from upstream, then push to your cloned repository branch.
171+
172+
```shell
173+
git pull upstream main
174+
git push
175+
```
176+
177+
```{seealso}
178+
[How to undo a committed submodule command](https://stackoverflow.com/a/46500544/2214933).
179+
```
180+
181+
132182
(contributing-documentation-only-label)=
133183

134184
### Working with only the `plone/documentation` repository

0 commit comments

Comments
 (0)