# fatal: A branch named 'feature/new-ui' already exists.

- **ID:** `git/rename-branch-conflict`
- **Domain:** git
- **Category:** config_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

Attempting to create or rename a branch to a name that already exists in the repository.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| git 2.42.0 | active | — | — |
| git 2.43.0 | active | — | — |
| git 2.44.0 | active | — | — |

## Workarounds

1. **Delete the existing branch first if safe: git branch -D feature/new-ui && git branch -m old-name feature/new-ui** (85% success)
   ```
   Delete the existing branch first if safe: git branch -D feature/new-ui && git branch -m old-name feature/new-ui
   ```
2. **Force push the renamed branch after local rename: git push origin --delete feature/new-ui && git push origin feature/new-ui** (75% success)
   ```
   Force push the renamed branch after local rename: git push origin --delete feature/new-ui && git push origin feature/new-ui
   ```

## Dead Ends

- **Using 'git branch -m old new' when 'new' already exists on remote** — Local rename does not check remote; push will fail with non-fast-forward (80% fail)
- **Deleting the local branch with 'git branch -D new' then trying to rename** — Remote branch still exists; push will still fail (70% fail)
