# `zfin contributions` Show contributions, withdrawals, and lot-level changes between two points in your portfolio's **git history**. ``` Usage: zfin contributions [opts] ``` `contributions` diffs two git revisions of your `portfolio.srf` and attributes the share/lot changes to new money vs. market movement. Your portfolio must be under git with commits over time. ## Modes | Invocation | Window | |-----------------------------|-----------------------------------------------------------| | (no flags), dirty tree | `HEAD` vs. working copy | | (no flags), clean tree | `HEAD~1` vs. `HEAD` (review the last commit) | | `--since ` | commit at/before DATE vs. HEAD (or working copy if dirty) | | `--since --until ` | commit at/before D1 vs. commit at/before D2 | `--until` alone is rejected (the window is ambiguous). Dates accept `YYYY-MM-DD` or `1W`/`1M`/`1Q`/`1Y`. ## Options | Flag | Effect | |--------------------------|-------------------------------------------------------------------------------------| | `--since ` | Earliest side (resolves to commit at/before). | | `--until ` | Latest side (pair with `--since`). | | `--commit-before ` | Pin the before commit directly (same grammar as `--commit-after`, minus `working`). | | `--commit-after ` | Pin the after commit: `YYYY-MM-DD`, relative, `HEAD`, `HEAD~N`, SHA, or `working`. | Pass at most one of `--since`/`--commit-before` (same axis), and at most one of `--until`/`--commit-after`. ## Example ```bash zfin contributions --since 1Y ``` Internal transfers between your own accounts are excluded from the attribution total when declared in [`transaction_log.srf`](../config/transaction-log-srf.md). ## See also - [Track contributions](../../guides/track-contributions.md) -- the full workflow. - [`compare`](compare.md) -- attribution alongside value and price moves. --- [CLI command reference](index.md)