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.4.0.tar.gz (8.9 kB view hashes)

Uploaded Source

Built Distribution

switchbox-0.4.0-py3-none-any.whl (10.6 kB view hashes)

Uploaded Python 3

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