Team Git Configuration Standards¶
1. Identity¶
- Use a consistent professional Git identity.
- Configure repository-specific identity when needed.
- Never commit credentials.
2. Branch configuration¶
- Default branch: main.
- Use descriptive feature branch names.
- Avoid rewriting shared history.
3. Aliases¶
Recommended aliases:
- st
- lg
- last
- branches
- root
- unstage
4. Ignore rules¶
- Ignore environment files.
- Ignore generated files.
- Ignore dependency directories.
- Keep example environment files.
5. Attributes¶
- Normalize text files.
- Use explicit line-ending rules.
- Mark binary files appropriately.
6. Pull and push policy¶
- Follow the team's selected integration strategy.
- Avoid force-pushing shared branches.
- Remove stale remote-tracking references when appropriate.
7. Commit signing¶
- Follow the team's signing policy.
- Protect private signing keys.
8. Repository hygiene¶
- Review ignored files.
- Review configuration origins.
- Keep repository configuration documented.