Skip to main content

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 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.3.4.tar.gz (9.4 kB view details)

Uploaded Source

Built Distribution

switchbox-0.3.4-py3-none-any.whl (10.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: switchbox-0.3.4.tar.gz
  • Upload date:
  • Size: 9.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.2.0 CPython/3.10.6 Linux/5.15.0-48-generic

File hashes

Hashes for switchbox-0.3.4.tar.gz
Algorithm Hash digest
SHA256 418e38660be60b909c3277fdef4319266bb5f8fb760b5ed7f9618bf333666d46
MD5 752aba5a84812dbdc69b8698ae660acc
BLAKE2b-256 01eecb03f0f78d5b3944b256938f64ba8a7ef9f8933bb7e941139802f56043e8

See more details on using hashes here.

File details

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

File metadata

  • Download URL: switchbox-0.3.4-py3-none-any.whl
  • Upload date:
  • Size: 10.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.2.0 CPython/3.10.6 Linux/5.15.0-48-generic

File hashes

Hashes for switchbox-0.3.4-py3-none-any.whl
Algorithm Hash digest
SHA256 5d6ca3c5b5d8f612923c0dc351566669a0cf4e349886c8027630807f8a242eb8
MD5 f49cb8c76bdcbf65b780d05617e3ba62
BLAKE2b-256 88e195a0a4919310829dde83c8e0a1ea68f3238a8ed9cc647e8482903db67936

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