Skip to main content

Tools for working with Git repositories.

Project description

switchbox

A collection of small tools for git workflows.

A screenshot displaying the output of 'switchbox finish'.

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 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.

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

switchbox-0.5.0.tar.gz (9.1 kB view details)

Uploaded Source

Built Distribution

switchbox-0.5.0-py3-none-any.whl (10.6 kB view details)

Uploaded Python 3

File details

Details for the file switchbox-0.5.0.tar.gz.

File metadata

  • Download URL: switchbox-0.5.0.tar.gz
  • Upload date:
  • Size: 9.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.1 CPython/3.12.3 Linux/6.8.9-300.fc40.x86_64

File hashes

Hashes for switchbox-0.5.0.tar.gz
Algorithm Hash digest
SHA256 a7bc2efd8faf9554d02bcd66f12a9a644d2f7726a57c215b5aea183a400ea795
MD5 f8c8fbfa0afcab92e6c5fe7e75c26d34
BLAKE2b-256 3483acebc5662af26d5ce3ed0bfef7bde4b4d74825bab361b7858eec42287a42

See more details on using hashes here.

File details

Details for the file switchbox-0.5.0-py3-none-any.whl.

File metadata

  • Download URL: switchbox-0.5.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.3 Linux/6.8.9-300.fc40.x86_64

File hashes

Hashes for switchbox-0.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1283e153a733ef2870a2250f51fbf60673220d46b001a54bb2a92fc41bef2199
MD5 01dc677d03907e9b25cfce53aecd7ec6
BLAKE2b-256 88980593092d8f4ecbdae24fd3e52090670126222b83f570a76fa977bea6585d

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page