Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 1 addition & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,9 @@ on:
- "v*"

jobs:
publish:
release:
runs-on: ubuntu-latest
permissions:
id-token: write
contents: write
steps:
- name: Checkout
Expand All @@ -25,9 +24,6 @@ jobs:
python -m pip install --upgrade pip build
python -m build

- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1

- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
__pycache__/
.venv/
*.pyc
.gitcoach-mailmap
.pytest_cache/
Expand Down
39 changes: 31 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Small, opinionated Git helper for solo developers.
- Keeping `dev` and `main` separated without extra ceremony
- Avoiding accidental commits of untracked files
- Switching between safety profiles (`solo-safe`, `fast`, `strict`) without editing hooks manually
- Safe undo/rollback actions without scary git commands
- Safe undo/rollback actions without memorizing low-level Git commands
- Shipping safely with fast-forward merges
- Diagnosing and fixing GitHub contributions issues caused by wrong commit email

Expand Down Expand Up @@ -82,18 +82,24 @@ python3 gitcoach.py interactive

## Installation

From PyPI:
Install directly from GitHub:

```bash
pipx install gitcoach
python3 -m venv .venv
. .venv/bin/activate
python3 -m pip install git+https://github.com/jodonnell24/gitcoach.git
```

From local checkout:
Or install from a local checkout:

```bash
pipx install .
python3 -m venv .venv
. .venv/bin/activate
python3 -m pip install -e .
```

The `gitcoach` name on PyPI currently belongs to an unrelated older project, so avoid `pip install gitcoach` for this repo until a package name is published for this implementation.

## Commit Message Help

Draft suggestions:
Expand All @@ -117,10 +123,12 @@ python3 gitcoach.py save --guided --strict-message

## 60-Second Quickstart

Install with pipx:
Install from GitHub:

```bash
pipx install gitcoach
python3 -m venv .venv
. .venv/bin/activate
python3 -m pip install git+https://github.com/jodonnell24/gitcoach.git
```

Try a safe beginner flow:
Expand Down Expand Up @@ -172,7 +180,7 @@ If you already have custom hooks and want to overwrite them:
python3 gitcoach.py guard --force
```

Noob-friendly behavior when guards are enabled:
Beginner-friendly behavior when guards are enabled:

- If `save` is blocked on `main`, `gitcoach` offers to auto-create a feature branch and retries commit there.
- `start` works even with dirty changes; it carries your work into the feature branch automatically.
Expand Down Expand Up @@ -293,6 +301,21 @@ Includes:
- Revert a chosen commit
- Restore one file back to `HEAD`

## Development

Install the package with development tools, then run the test suite:

```bash
python3 -m pip install -e ".[dev]" build
python3 -m pytest
```

Build package artifacts locally with:

```bash
python3 -m build
```

## Safety Notes

- Rewriting history changes commit hashes.
Expand Down
17 changes: 11 additions & 6 deletions RELEASING.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
# Releasing GitCoach

GitCoach is not currently published to PyPI. The `gitcoach` name on PyPI belongs to an unrelated older project, so tagged releases currently build artifacts and attach them to a GitHub Release only.

## 1. Prepare release

1. Ensure tests pass locally: `pytest`
1. Ensure tests pass locally: `python -m pytest`
2. Update version in `pyproject.toml`
3. Update `CHANGELOG.md`
4. Commit changes
Expand All @@ -19,15 +21,18 @@ git push origin v0.1.0
On `v*` tags, GitHub Actions will:

- Build `sdist` and `wheel`
- Publish to PyPI (`pypa/gh-action-pypi-publish`)
- Create a GitHub release with generated notes
- Create a GitHub Release with generated notes
- Attach the built `sdist` and `wheel` artifacts

## 4. Verify

1. Confirm package on PyPI
2. Test install in clean env:
Test the GitHub install path in a clean environment:

```bash
pipx install gitcoach
python -m venv /tmp/gitcoach-release-check
. /tmp/gitcoach-release-check/bin/activate
python -m pip install git+https://github.com/jodonnell24/gitcoach.git
gitcoach --help
```

If a PyPI release becomes a goal later, choose and reserve a package name before adding PyPI publishing back to the release workflow.
Loading