mirror of
https://github.com/RGBCube/Site
synced 2025-08-01 13:37:49 +00:00
blog.gitignore: fixes
This commit is contained in:
parent
16601d0ffb
commit
adda3bf185
1 changed files with 8 additions and 4 deletions
|
@ -84,14 +84,14 @@ deceiving the underworld.
|
||||||

|
on it](/assets/images/sisyphus-ds-store.webp)
|
||||||
|
|
||||||
How do you escape this endless loop of ignoring files that sneak in? Maybe by
|
How will you escape this endless loop of ignoring files that sneak in? Maybe by
|
||||||
educating every single merge request author? Nope, that definitely won't work,
|
educating every single merge request author? Nope, that definitely won't work,
|
||||||
there should be a way to automatically handle this with tooling, rather than
|
there should be a way to automatically handle this with tooling, rather than
|
||||||
subjective human communication.
|
subjective human communication.
|
||||||
|
|
||||||
Luckily, you realize that you can turn the blacklist of files (the gitignore) to
|
Luckily, you realize that you can turn the blacklist of files (the gitignore)
|
||||||
a whitelist, by just ignoring everything and manually un-ignoring desired files.
|
into a whitelist, by just ignoring everything and manually un-ignoring desired
|
||||||
You change your gitignore to this:
|
files. You change your gitignore to this:
|
||||||
|
|
||||||
```ignore
|
```ignore
|
||||||
*
|
*
|
||||||
|
@ -99,19 +99,23 @@ You change your gitignore to this:
|
||||||
!.gitignore
|
!.gitignore
|
||||||
|
|
||||||
# whitelist `src` directories and their children, regardless of place
|
# whitelist `src` directories and their children, regardless of place
|
||||||
|
!src/
|
||||||
!src/**/
|
!src/**/
|
||||||
!src/**/*.rs
|
!src/**/*.rs
|
||||||
!Cargo.{toml,lock}
|
!Cargo.{toml,lock}
|
||||||
|
|
||||||
# whitelist root `pysrc` directory
|
# whitelist root `pysrc` directory
|
||||||
|
!/pysrc/
|
||||||
!/pysrc/*.py
|
!/pysrc/*.py
|
||||||
!pyproject.toml
|
!pyproject.toml
|
||||||
!poetry.lock
|
!poetry.lock
|
||||||
|
|
||||||
|
!/cmd/
|
||||||
!/cmd/*.go
|
!/cmd/*.go
|
||||||
!main.go
|
!main.go
|
||||||
!go.{mod,sum}
|
!go.{mod,sum}
|
||||||
|
|
||||||
|
!/docs/
|
||||||
!/docs/*.md
|
!/docs/*.md
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue