跳转到主要内容

用于处理Git仓库的工具。

项目描述

switchbox

一套用于git工作流程的小工具。

A screenshot displaying the output of 'switchbox finish'.

安装

克隆仓库并使用pip安装包。

pip install --user .

用法

直接调用switchbox或通过git switchbox运行。

Switchbox命令假定您的git仓库有一个默认分支和一个默认远程。当Switchbox首次使用(或您运行switchbox setup)时,它将找到并记住这些名称。

  • 默认分支将使用名为mainmaster的分支。
  • 默认远程将使用名为upstreamorigin的远程。

Switchbox选项在仓库的.git/config文件下的switchbox部分设置。

switchbox config

显示Switchbox设置的配置选项。

switchbox config init

检测默认分支和默认远程,并将它们保存到仓库的git配置中。这将在使用默认分支或默认远程的第一个命令时自动执行。

switchbox config default-branch $branch

更改默认分支。

switchbox config default-remote $remote

更改默认远程。

switchbox finish [--update/--no-update]

  • 更新所有git远程。
  • 将本地默认分支更新为与远程默认分支匹配。
  • 切换到默认分支。
  • 删除合并到默认分支的分支。
  • 删除合并到默认分支的分支。

switchbox tidy [--update/--no-update]

  • 更新所有git远程。
  • 删除合并到默认分支的分支。
  • 删除合并到默认分支的分支。

switchbox update

  • 更新所有git远程。

项目详情


下载文件

下载适合您平台的文件。如果您不确定选择哪个,请了解更多关于 安装包 的信息。

源代码发行版

switchbox-0.5.0.tar.gz (9.1 kB 查看哈希值)

上传时间 源代码

构建发行版

switchbox-0.5.0-py3-none-any.whl (10.6 kB 查看哈希值)

上传时间 Python 3

由以下支持