Tools for working with Git repositories.
Project description
switchbox
A collection of small tools for git workflows.
Installation
Clone the repository and install the package with pip
.
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
ormaster
. - The default remote will use a remote named
upstream
ororigin
.
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.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file switchbox-0.4.0.tar.gz
.
File metadata
- Download URL: switchbox-0.4.0.tar.gz
- Upload date:
- Size: 8.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.7.1 CPython/3.12.2 Linux/6.8.4-200.fc39.x86_64
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 96ad684ac5e01ce71105acc264ca7a985edad1196354ec601318ac0cad7243a5 |
|
MD5 | 4785257a42397733a70993c07d167120 |
|
BLAKE2b-256 | 127105b6d3ff7e1ac569b04c9d84719ab93d47dda192cf26060c4baedfe99473 |
File details
Details for the file switchbox-0.4.0-py3-none-any.whl
.
File metadata
- Download URL: switchbox-0.4.0-py3-none-any.whl
- Upload date:
- Size: 10.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.7.1 CPython/3.12.2 Linux/6.8.4-200.fc39.x86_64
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 721f3b8ad8ead0bfef2df88f1028e4e1025893f35da3d2a6962e2519665d3689 |
|
MD5 | 5fe70d37073c0179cd94185f257da4ed |
|
BLAKE2b-256 | d4d3593f23409098478dda6b4253c59153b36c52d0a9abd3a25d9d4696294b3b |