Skip to content

Latest commit

 

History

History
74 lines (57 loc) · 1.64 KB

gitignore.md

File metadata and controls

74 lines (57 loc) · 1.64 KB

Gitignore Guidelines

  1. We prefer absolute paths.

    - build
    - .venv
    - Cargo.lock
    + /build
    + /.venv
    + /Cargo.lock
  2. Paths that are expected to be directories should be prefixed with a /.

    @ gitignore.md
    - /build
    - /.venv
    + /build/
    + /.venv/
  3. If the ignores are only relevant to a specific project/folder, we prefer to put them in the .gitignore file of that project/folder. But try to keep it simple.

    @ gitignore.md
    - /packages/frontend/node_modules
    @ packages/frontend/.gitignore
    + node_modules
  4. You can still be granular with enough generality on subdirectories.

    @ gitignore.md
    - /crates/my_pack/target/
    + /crates/*/target
  5. Editor config can be tracked.

    @ gitignore.md
    - /.vscode/

    If you want to add a config to the workspace that should not be tracked in in VCS, you can use for example multi-root workspaces.

  6. Grouping should be like this:

    # Personal files / random stuff
    /tmp/           # Temporary/test/playground files
    *~              # Backup files
    
    # Our workflow
    /.direnv/       # Direnv, dev environment, and not everyone uses
    /result         # Nix build output
    /.venv/         # Python virtualenv
    
    # Generic language/tooling stuff
    /node_modules/  # Node modules 
    /target/        # Rust build output
    __pycache__/    # Python bytecode
    
    # Generic generic
    .DS_Store       # MacOS stuff