# Default .gitignore for Racket

**URL:** <https://racket.discourse.group/t/default-gitignore-for-racket/534>\
**Category:** Questions & Answers\
**Tags:** github\
**Created:** [January 7, 2022, 2:30pm UTC](https://racket.discourse.group/t/default-gitignore-for-racket/534 "2022-01-07T14:30:00Z")\
**Posts on this page:** 9\
**Page:** 2

<div class="post-metadata">

**Author:** ![spdegabrielle](https://yyz2.discourse-cdn.com/free1/user_avatar/racket.discourse.group/spdegabrielle/32/95_2.png) [@spdegabrielle](https://racket.discourse.group/u/spdegabrielle)\
**Post date:** [January 17, 2022, 8:02pm UTC](https://racket.discourse.group/t/default-gitignore-for-racket/534/21 "2022-01-17T20:02:33Z")

</div>

If there are no more changes required to the pull request it could do with a bunch of likes from racketeers and maybe a supportive comment from maintainers of `racket/racket` to attract attention of the maintainers of [https://github.com/github/gitignore](https://github.com/github/gitignore)

PR: [https://github.com/github/gitignore/pull/3943](https://github.com/github/gitignore/pull/3943)

```scheme
*~
.DS_Store
compiled/
/doc/

```

As they say on youtube _please like and subscribe_

---

<div class="post-metadata">

**Author:** ![jbclements](https://yyz2.discourse-cdn.com/free1/user_avatar/racket.discourse.group/jbclements/32/11_2.png) [@jbclements](https://racket.discourse.group/u/jbclements)\
**Post date:** [January 17, 2022, 10:14pm UTC](https://racket.discourse.group/t/default-gitignore-for-racket/534/22 "2022-01-17T22:14:18Z")

</div>

I think the case for

```scheme
*~

```

is much stronger than that for

```scheme
.DS_Store

```

because DrRacket itself generates these files.

---

<div class="post-metadata">

**Author:** ![spdegabrielle](https://yyz2.discourse-cdn.com/free1/user_avatar/racket.discourse.group/spdegabrielle/32/95_2.png) [@spdegabrielle](https://racket.discourse.group/u/spdegabrielle)\
**Post date:** [January 17, 2022, 11:10pm UTC](https://racket.discourse.group/t/default-gitignore-for-racket/534/23 "2022-01-17T23:10:59Z")

</div>

The they can both stay?

Keep in mind this is for beginners to have a good first experience. More experienced developers will customise this or have a global default.

---

<div class="post-metadata">

**Author:** ![jbclements](https://yyz2.discourse-cdn.com/free1/user_avatar/racket.discourse.group/jbclements/32/11_2.png) [@jbclements](https://racket.discourse.group/u/jbclements)\
**Post date:** [January 18, 2022, 12:28am UTC](https://racket.discourse.group/t/default-gitignore-for-racket/534/24 "2022-01-18T00:28:49Z")

</div>

Oh, don't get me wrong, I thumbs-upped the pull request; I wouldn't torpedo the existing PR by expressing doubt on that github issue's comment chain. This is something that can be edited later or never; the proposal is a clear improvement on what's there now (that is, nothing at all).

---

<div class="post-metadata">

**Author:** ![greghendershott](https://yyz2.discourse-cdn.com/free1/user_avatar/racket.discourse.group/greghendershott/32/98_2.png) [@greghendershott](https://racket.discourse.group/u/greghendershott)\
**Post date:** [January 18, 2022, 4:54am UTC](https://racket.discourse.group/t/default-gitignore-for-racket/534/25 "2022-01-18T04:54:35Z")

</div>

I agree -- I think the PR looks good! Even if the maintainers think that e.g. `.DS_Store` shouldn't be in there because they prefer that stuff to be in `/Global`, or whatever, I'm sure they'll give you that feedback.

---

<div class="post-metadata">

**Author:** ![spdegabrielle](https://yyz2.discourse-cdn.com/free1/user_avatar/racket.discourse.group/spdegabrielle/32/95_2.png) [@spdegabrielle](https://racket.discourse.group/u/spdegabrielle)\
**Post date:** [January 23, 2022, 11:59pm UTC](https://racket.discourse.group/t/default-gitignore-for-racket/534/26 "2022-01-23T23:59:41Z")

</div>

Should the `.gitignore` include

```scheme
.bak

```

for windows users?

---

<div class="post-metadata">

**Author:** ![mflatt](https://yyz2.discourse-cdn.com/free1/user_avatar/racket.discourse.group/mflatt/32/6_2.png) [@mflatt](https://racket.discourse.group/u/mflatt)\
**Post date:** [January 31, 2022, 11:37pm UTC](https://racket.discourse.group/t/default-gitignore-for-racket/534/27 "2022-01-31T23:37:25Z")

</div>

For what it's worth, omitting `#` files works better for me than not omitting them. An unsaved change is rarely something that I want to keep, because I've normally just run a build/tests that use the saved files. Instead, a `#` file is usually because I accidentally typed `<` instead of `Meta-<` at some point when trying to jump to the start of something that I'm merely reading (and I haven't quit the editor). Omitting `#` files almost certainly saves me more trouble than having them added in the `racket/racket` repo. Also, putting rules in a machine-specific configuration is not a good solution for me, because I spend a lot of time on short-lived virtual machines or Docker containers, and it's sometimes easiest to push repairs from those environments.

All that said, I don't have a strong opinion for `raco pkg new`.

---

<div class="post-metadata">

**Author:** ![spdegabrielle](https://yyz2.discourse-cdn.com/free1/user_avatar/racket.discourse.group/spdegabrielle/32/95_2.png) [@spdegabrielle](https://racket.discourse.group/u/spdegabrielle)\
**Post date:** [February 1, 2022, 8:59am UTC](https://racket.discourse.group/t/default-gitignore-for-racket/534/28 "2022-02-01T08:59:30Z")

</div>

I’ve closed the PR request for `raco pkg new`.

After a comment in the PR

> @MystPi MystPi commented 10 days ago •  
> What about .bak files? [3.5&nbsp;DrRacket Files](https://docs.racket-lang.org/drracket/drracket-files.html) They are the \*~ for Windows.

[https://github.com/github/gitignore/pull/3943](https://github.com/github/gitignore/pull/3943) is currently

```scheme
.DS_Store
compiled/
/doc/
*~
*.bak
\#*
.\#*

```

I think this is about right as it means new users will get a sensible default .gitignore that will hold them over until they are doing their own `/Global` gitignore configuration.

More feedback is encouraged.

PS  
If anyone knows a way to get the attention of the maintainers of [https://github.com/github/gitignore](https://github.com/github/gitignore) so the PR can be merged that would be appreciated

---

<div class="post-metadata">

**Author:** ![spdegabrielle](https://yyz2.discourse-cdn.com/free1/user_avatar/racket.discourse.group/spdegabrielle/32/95_2.png) [@spdegabrielle](https://racket.discourse.group/u/spdegabrielle)\
**Post date:** [February 22, 2022, 1:23pm UTC](https://racket.discourse.group/t/default-gitignore-for-racket/534/29 "2022-02-22T13:23:31Z")

</div>

Just merged 😀

> <https://github.com/github/gitignore/pull/3943>
>
> \*\*Reasons for making this change:\*\*
> 
> I want git to ignore temporary files in r…acket repos
> 
> \*\*Links to documentation supporting these rule changes:\*\*
> 
> https://github.com/racket/racket/blob/ccdbe0a53ddb06ce6f538dba5eddecd03ef15985/racket/collects/pkg/private/new.rkt#L115
> 
> \## If this is a new template: YES
> 
> - \*\*Link to application or project’s homepage\*\*:
>  
> https://github.com/racket/racket
> 
> https://racket-lang.org/

Not yet available😭

[Previous page](https://racket.discourse.group/t/default-gitignore-for-racket/534.md?page=1)
