Skip to content

Commit 31e85f2

Browse files
authored
Add details for user .gitignore configuration (#6228)
1 parent 5b3f4fb commit 31e85f2

File tree

1 file changed

+19
-8
lines changed

1 file changed

+19
-8
lines changed

docs/app/core-concepts/writing-and-organizing-tests.mdx

Lines changed: 19 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -93,12 +93,15 @@ detail.
9393

9494
<strong>What files should I add to my '.gitignore file' ?</strong>
9595

96-
Cypress will create a
97-
[`screenshotsFolder`](/app/references/configuration#Screenshots) and a
98-
[`videosFolder`](/app/references/configuration#Videos) to store the
99-
screenshots and videos taken during the testing of your application. Many users
100-
will opt to add these folders to their `.gitignore` file. Additionally, if you
101-
are storing sensitive environment variables in your
96+
Cypress may create
97+
[asset files](#Asset-Files) in a
98+
[`downloadsFolder`](#Download-Files), a
99+
[`screenshotsFolder`](#Screenshot-Files) or a
100+
[`videosFolder`](#Video-Files) to store any downloads,
101+
screenshots or videos created during the testing of your application.
102+
Many users will opt to add these folders to their
103+
[.gitignore](https://git-scm.com/docs/gitignore) file (see [below](#Asset-Files) for an example).
104+
Additionally, if you are storing sensitive environment variables in your
102105
[Cypress configuration](/app/references/configuration) or
103106
[`cypress.env.json`](/app/references/environment-variables#Option-2-cypressenvjson),
104107
these should also be ignored when you check into source control.
@@ -151,8 +154,16 @@ command and most often when you're stubbing
151154
There are some folders that may be generated after a test run, containing assets
152155
that were generated during the test run.
153156

154-
You may consider adding these folders to your `.gitignore` file to ignore
155-
checking these files into source control.
157+
You may consider adding these folders to your
158+
[.gitignore](https://git-scm.com/docs/gitignore) file to prevent
159+
checking files in these folders into source control, for example, using the default folder locations:
160+
161+
```text
162+
# Cypress asset folders to exclude from source control
163+
cypress/downloads/
164+
cypress/screenshots/
165+
cypress/videos/
166+
```
156167

157168
#### Download Files
158169

0 commit comments

Comments
 (0)