# git rev-list --left-right --count Interpretation

**Common pitfall: reading the output backwards.**

## Command

```bash
git rev-list --left-right --count A...B
```

Returns two numbers: `left<TAB>right`

- **Left** = commits reachable from A but NOT from B
- **Right** = commits reachable from B but NOT from A

## Example

```bash
$ git rev-list --left-right --count master...HEAD
0	55
```

**Wrong interpretation:** "HEAD is 55 commits behind master."
**Correct interpretation:** "HEAD has 55 commits that master doesn't" (HEAD is 55 **ahead**).

The right column counts the **second argument's** unique commits. Since `B` is `HEAD`, right counts HEAD's exclusive commits.

## Better alternatives (less ambiguous)

```bash
# Commits in HEAD not in master (your new work)
git log --oneline master..HEAD

# Commits in master not in HEAD (behind status)
git log --oneline HEAD..master
```

These use symmetric difference notation `A..B` which reads intuitively as "B's commits not in A." The output is never ambiguous because you see the actual commit messages.

## Detection

If the output looks wrong or counterintuitive, always fall back to `git log --oneline A..B` to verify.
