# What should we include in our .gitignore file?

**URL:** <https://forum.pinegrow.com/t/what-should-we-include-in-our-gitignore-file/6713>\
**Category:** Questions\
**Created:** [July 25, 2022, 11:41am UTC](https://forum.pinegrow.com/t/what-should-we-include-in-our-gitignore-file/6713 "2022-07-25T11:41:24Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![fakesamgregory](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.pinegrow.com/fakesamgregory/32/3903_2.png) [@fakesamgregory](https://forum.pinegrow.com/u/fakesamgregory)\
**Post date:** [July 25, 2022, 11:41am UTC](https://forum.pinegrow.com/t/what-should-we-include-in-our-gitignore-file/6713/1 "2022-07-25T11:41:24Z")

</div>

I have the following in my gitignore. Are these recommended? They seem specific to my workspace.

```nohighlight
_pgbackup
_pginfo
pinegrow.json

```

---

<div class="post-metadata">

**Author:** ![TechAkayy](https://avatars.discourse-cdn.com/v4/letter/t/ce73a5/32.png) [@TechAkayy](https://forum.pinegrow.com/u/TechAkayy)\
**Post date:** [July 25, 2022, 11:47am UTC](https://forum.pinegrow.com/t/what-should-we-include-in-our-gitignore-file/6713/2 "2022-07-25T11:47:36Z")

</div>

That’s my list as well 👍🏽

---

<div class="post-metadata">

**Author:** ![adamslowe](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.pinegrow.com/adamslowe/32/4590_2.png) [@adamslowe](https://forum.pinegrow.com/u/adamslowe)\
**Post date:** [July 27, 2022, 11:41pm UTC](https://forum.pinegrow.com/t/what-should-we-include-in-our-gitignore-file/6713/3 "2022-07-27T23:41:50Z")

</div>

I have:

```auto
/node_modules
/_pgbackup
package-lock.json
.DS_Store

```

I keep \_pginfo and pinegrow.json, but I’m interested in understanding your reason for ignoring them.

---

<div class="post-metadata">

**Author:** ![fakesamgregory](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.pinegrow.com/fakesamgregory/32/3903_2.png) [@fakesamgregory](https://forum.pinegrow.com/u/fakesamgregory)\
**Post date:** [July 28, 2022, 8:49am UTC](https://forum.pinegrow.com/t/what-should-we-include-in-our-gitignore-file/6713/4 "2022-07-28T08:49:39Z")

</div>

Because they change with every commit. I have yet to work on a Pinegrow project with another dev but my assumption is that it’s to do with my personal setup of Pinegrow and not necessary. That’s what I wanted clarification on.

On another note, why are you ignoring package-lock? [You shouldn’t ignore package-lock.json](https://stackoverflow.com/questions/48524417/should-the-package-lock-json-file-be-added-to-gitignore).

---

<div class="post-metadata">

**Author:** ![adamslowe](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.pinegrow.com/adamslowe/32/4590_2.png) [@adamslowe](https://forum.pinegrow.com/u/adamslowe)\
**Post date:** [July 28, 2022, 9:43am UTC](https://forum.pinegrow.com/t/what-should-we-include-in-our-gitignore-file/6713/5 "2022-07-28T09:43:04Z")

</div>

Thanks for the info about package-lock.json – I learn something new every day!

I keep pinegrow.json since it holds configuration information or my project and theme. Without it, my WordPress and TailWind theme settings get all mucked up. I haven’t tried excluding \_pginfo yet, but since it holds my class tracker, I’m hesitant to exclude it.

---

<div class="post-metadata">

**Author:** ![jcamachott](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.pinegrow.com/jcamachott/32/822_2.png) [@jcamachott](https://forum.pinegrow.com/u/jcamachott)\
**Post date:** [August 2, 2022, 1:46pm UTC](https://forum.pinegrow.com/t/what-should-we-include-in-our-gitignore-file/6713/6 "2022-08-02T13:46:34Z")

</div>

If you also use VSCode you might want to put .history in there too

---

<div class="post-metadata">

**Author:** ![fakesamgregory](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.pinegrow.com/fakesamgregory/32/3903_2.png) [@fakesamgregory](https://forum.pinegrow.com/u/fakesamgregory)\
**Post date:** [August 2, 2022, 2:04pm UTC](https://forum.pinegrow.com/t/what-should-we-include-in-our-gitignore-file/6713/7 "2022-08-02T14:04:13Z")

</div>

I’ve not seen this. Is this something Pinegrow creates? because FYI, my .gitignore is much bigger than I’ve show, I’m just focusing on Pinegrow files.

---

<div class="post-metadata">

**Author:** ![jcamachott](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.pinegrow.com/jcamachott/32/822_2.png) [@jcamachott](https://forum.pinegrow.com/u/jcamachott)\
**Post date:** [August 2, 2022, 4:34pm UTC](https://forum.pinegrow.com/t/what-should-we-include-in-our-gitignore-file/6713/8 "2022-08-02T16:34:36Z")

</div>

Ignore if you don’t use the history plugin in VSCode

---

<div class="post-metadata">

**Author:** ![mickythompson](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.pinegrow.com/mickythompson/32/5095_2.png) [@mickythompson](https://forum.pinegrow.com/u/mickythompson)\
**Post date:** [December 29, 2022, 4:56pm UTC](https://forum.pinegrow.com/t/what-should-we-include-in-our-gitignore-file/6713/9 "2022-12-29T16:56:04Z")

</div>

1. We include **\_pgbackup** in our .gitignore because this folder expands quickly and is not critical. We consider these files temporary. Also, I just tested the Visual Code extension ‘Local History’ suggested by @jcamachott and have now added **.history** to our .gitignore. Great recommendation!

2. We agree with @adamslowe for tracking **pinegrow.json**. We enter !pinegrow.json expressly in .gitignore to point out that this file needs to be tracked. We have found that this file holds configuration information for our projects and themes.

3. We also expressly track **projectdb.pgml** (i.e., !projectdb.pgml). Pinegrow states explicitly, “The style definitions are kept in projectdb.pgml file. It’s recommended to keep this file under source control.” Source: [Class styles | Pinegrow Web Editor](https://pinegrow.com/docs/tailwind/class-styles/)

4. Furthermore, we expressly track **\_pginfo/** (i.e., !\_pginfo/). Based on our research, similar to @adamslowe, this folder contains critical files (i.e., fonts.json) needed by the Pinegrow project.

5. We also do not track **node\_modules** as @adamslowe stated. This folder is used to download dependencies. The contents of this folder can be recreated.

6. We’ve also added to .gitignore the **\_pgexport/** folder as we consider this folder and its contents temporary. This directory can be recreated by performing another export from the Pinegrow project. Pinegrow uses this folder based on our review to build the export and then copy the files to the final destination set under Pinegrow’s ‘WordPress Theme Settings,’ either the Theme or Plugin folder. **Are there any files saved to \_pgexport/ that Pinegrow cannot recreate? Any other reason to track \_pgexport/?**

---

<div class="post-metadata">

**Author:** ![fakesamgregory](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.pinegrow.com/fakesamgregory/32/3903_2.png) [@fakesamgregory](https://forum.pinegrow.com/u/fakesamgregory)\
**Post date:** [January 1, 2023, 3:32pm UTC](https://forum.pinegrow.com/t/what-should-we-include-in-our-gitignore-file/6713/10 "2023-01-01T15:32:25Z")

</div>

This is fantastic. It has already become useful and I’ve implemented. Cheers @mickythompson
