Click me
- Foo
- Bar
- Baz
- Qux
function logSomething(something) {
console.log('Something', something);
}<details>
<summary>Click me</summary>
### Heading
1. Foo
2. Bar
* Baz
* Qux
### Some Javascript
```js
function logSomething(something) {
console.log('Something', something);
}
```
</details>To have a collapsible section expanded by default, simply include the 'open' attribute within the <details> tag:
Hello
World!<details open>
<summary>Hello</summary>
World!
</details>
You can modify the appearance of the clickable text by adding styling inside the <summary> tags:
Wow, so fancy
WOW, SO BOLD<details>
<summary><i>Wow, so fancy</i></summary>
<b>WOW, SO BOLD</b>
</details>
NB: When including headings within collapsible sections, remember to add a new line after the <summary> tag.
Section A
Section A.B
Section A.B.C
Section A.B.C.D
Done!<details>
<summary>Section A</summary>
<details>
<summary>Section A.B</summary>
<details>
<summary>Section A.B.C</summary>
<details>
<summary>Section A.B.C.D</summary>
Done!
</details>
</details>
</details>
</details>
- If certain markdown or styling, such as
# My Title, fails to render in the collapsible section, try adding a line break after the</summary>tag. - If your section fails to render, it might be malformed. Consider copying the functional examples provided here and building from there!

Is invalid hyperlink?
*WARNING: git filter-branch is no longer officially recommended.
The official recommendation is to use git-filter-repo.
see André Anjos' answer for details.
If you are here to copy-paste code:
This is an example which removes
node_modulesfrom historyWhat git actually does:
The first line iterates through all references on the same tree (
--tree-filter) as HEAD (your current branch), running the commandrm -rf node_modules. This command deletes the node_modules folder (-r, without-r,rmwon't delete folders), with no prompt given to the user (-f). The added--prune-emptydeletes useless (not changing anything) commits recursively.The second line deletes the reference to that old branch.
The rest of the commands are relatively straightforward.