Metadata-Version: 2.1
Name: switchbox
Version: 0.3.4
Summary: Tools for working with Git repositories.
Home-page: https://pypi.org/project/switchbox/
License: MPL-2.0
Author: Sam Clements
Author-email: sam@borntyping.co.uk
Requires-Python: >=3.10,<4.0
Classifier: Development Status :: 5 - Production/Stable
Classifier: Environment :: Console
Classifier: License :: OSI Approved
Classifier: License :: OSI Approved :: Mozilla Public License 2.0 (MPL 2.0)
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Topic :: Software Development
Classifier: Topic :: Software Development :: Version Control
Classifier: Topic :: Software Development :: Version Control :: Git
Requires-Dist: GitPython (>=3.1.27,<4.0.0)
Requires-Dist: PyGithub (>=1.55,<2.0)
Requires-Dist: click (>=8.1.3,<9.0.0)
Requires-Dist: giturl (>=0.1.3,<0.2.0)
Requires-Dist: inflect (>=6.0.0,<7.0.0)
Requires-Dist: rich (>=12.5.1,<13.0.0)
Project-URL: Repository, https://github.com/borntyping/switchbox
Description-Content-Type: text/markdown

switchbox
=========

A collection of small tools for git workflows.

Installation
------------

Clone the repository and install the package with `pip`.

```zsh
pip install --user .
```

Usage
-----

Invoke `switchbox` directly or run it via `git switchbox`.

Switchbox commands assume your git repository has a default branch and a
default remote. When Switchbox is used for the first time (or you run
`switchbox setup`) it will find and remember names for these.

* The default branch will use a branch named `main` or `master`.
* The default remote will use a remote named `upstream` or `origin`.

Switchbox options are set in a repository's `.git/config` file under a
`switchbox` section.

### `switchbox config`

Show config options that Switchbox has set.

### `switchbox config init`

Detect a default branch and default remote, and save them to the repository's
git configuration. This will be done automatically when you first use a command
that works on a default branch or default remote.

### `switchbox config default-branch $branch`

Change the default branch.

### `switchbox config default-remote $remote`

Change the default remote.

### `switchbox finish [--update/--no-update]`

* Update all git remotes.
* Update the local default branch to match the remote default branch.
* Switch to the default branch.
* Remove branches **merged** into the default branch.
* Remove branches **squashed** into the default branch.

### `switchbox tidy [--update/--no-update]`

* Update all git remotes.
* Remove branches **merged** into the default branch.
* Remove branches **squashed** into the default branch.

### `switchbox update`

* Update all git remotes.

