# Git Workflow FAQ (faq1)

## Q1 – When to use tags?
- Use tags for releases/milestones: `v1.0.0`, `v2.3.1`.
- Branch for ongoing work; tag for fixed points.

## Q2 – When to change branch?
- Use a single `main` branch + tags unless you must maintain multiple versions in parallel.
- Create version branches (e.g., `2.x`, `3.x`) only if you support multiple majors at once.

## Q4 – How to check repository files, dates, sizes, versions?
- Files with dates: `git log -1 --format='%ad' --date=short -- path/to/file`
- Files with sizes: `git ls-files | xargs ls -lSh`
- Largest blobs: `git rev-list --objects --all | git cat-file --batch-check='%(objecttype) %(objectname) %(objectsize) %(rest)' | sed -n 's/^blob //p' | sort -k2 -nr | head -n 20`
- Versions are tags/commits; use `git describe --tags --always`.

## Q5 – Auto version/filename in each file?
- Git does not expand version macros in files.
- Recommended: single `VERSION` file; app reads it at runtime.
- Optionally generate versioned files at build/deploy time.

## git-bump-version usage
- `./git-bump-version` → auto-increment patch.
- `./git-bump-version 2.0.0` → set explicit version.
- Updates `VERSION`, commits, tags `v<version>`.
