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

Uploaded Source

Built Distribution

switchbox-0.3.1-py3-none-any.whl (9.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: switchbox-0.3.1.tar.gz
  • Upload date:
  • Size: 9.1 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.1.tar.gz
Algorithm Hash digest
SHA256 9f8fdf7a384ea69e2713263ce1d7086f1238628a80f4b75c6a8b465a0ed5ffa7
MD5 1aad0c0f61de4c642ded01d1c414c3db
BLAKE2b-256 9431d9e04c0a7b0bf3effb54ef09a359ce0448b5782da10ce11974f9da77f11b

See more details on using hashes here.

File details

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

File metadata

  • Download URL: switchbox-0.3.1-py3-none-any.whl
  • Upload date:
  • Size: 9.8 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 2335396134027ad17844665665aad3882186bdee8bfe69d646c585ddebcf119d
MD5 b8a75be0b2a9c84b4dafe5449a1f3a25
BLAKE2b-256 1b6b7f2be1593b69903a0d36902fb832802940286c1eefe0652ecc74ecae77f1

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