Skip to content

Git

🎯 Git

git config --global user.name "Your Name"
git config --global user.email "youremail@yourdomain.com"
git config --global core.editor "nvim"

📦 uv

Install uv:

curl -LsSf https://astral.sh/uv/install.sh | sh

Create a new project:

uv init

Edit pyproject.toml.

[project]
name = "myproject"
version = "0.1.0"
description = ""
requires-python = ">=3.12"
authors = ["John Doe"]
license = "MIT"
readme = "README.md"
dependencies = [
    "loguru",
    "rich",
    "typer",
]

Create a new environment:

uv venv --python 3.12

Add dependencies:

uv add foo

To create a lock file:

uv lock

To install the lock file:

uv sync

To install optional dependencies:

uv sync --extra foo

To install with all optional dependencies:

uv sync --all-extras

🅿 Pre-commit

Always install/update your pre-commit to use the latest versions prior to starting a project.

uv run pre-commit install
uv run pre-commit autoupdate

✅ Tracking Large Files

To track large files use Git LFS.

brew install git-lfs
git lfs install

Select which files to track:

git lfs track "*.mp4"

Make sure to .gitattributes is tracked:

git add .gitattributes