npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

git-toolkit-publish

v1.4.1

Published

Git 管理工具

Downloads

267

Readme

Git Toolkit 🚀

简介

Git Toolkit 是一个强大且灵活的命令行 Git 管理工具,旨在简化日常 Git 操作,提高开发效率。

🛠 安装步骤

环境要求

  • Node.js >= 14.0.0
  • Git >= 2.0

安装方式

方式一:全局安装(推荐)

# 使用 npm
npm install -g git-toolkit

# 或使用 yarn
yarn global add git-toolkit

方式二:本地开发安装

# 1. 克隆仓库
git clone https://github.com/your-username/git-toolkit.git

# 2. 进入项目目录
cd git-toolkit

# 3. 安装依赖
npm install

# 4. 链接到全局
npm link

📖 使用手册

基础操作

  1. 启动工具
gt

将显示主菜单:

  • [0] 创建分支
  • [1] 切换分支
  • [2] 合并本地分支
  • [3] 推送分支
  • [4] 提交代码
  • [5] 撤销代码
  • [6] Shell 命令
  • [7] 一键发布
  • [8] 自定义发布
  • [h] 帮助
  • [f] 刷新
  • [r] 强制重置
  • [s] 状态查看
  • [d] 删除分支
  • [mr] 合并远端分支
  • [a] 高级操作
  • [q] 退出
  1. 分支操作
# 创建分支
gt
# 选择 [0] 创建分支
# 选择分支类型:
# - 功能分支 (feature-YYYYMMDD-)
# - 发布分支 (release-YYYYMMDD)
# - 修复分支 (fix-YYYYMMDD-)

# 切换分支
gt
# 选择 [1] 切换分支
# 输入分支名称

# 删除分支
gt
# 选择 [d] 删除分支
# 选择删除类型:本地分支/远程分支
# 输入要删除的分支名称
  1. 代码提交与推送
# 提交代码
gt
# 选择 [4] 提交代码
# 输入提交信息

# 推送分支
gt
# 选择 [3] 推送分支
# 输入远程仓库名称(默认: origin)
  1. 分支合并
# 合并本地分支
gt
# 选择 [2] 合并本地分支
# 输入源分支名称

# 合并远端分支
gt
# 选择 [mr] 合并远端分支
# 从列表选择要合并的远端分支

高级功能

  1. 仓库配置
gt
# 选择 [a] 高级操作
# 选择 "仓库设置"
# 选择仓库类型:
# - 普通仓库
# - 静态资源仓库
# - 组件仓库
# - 超市仓库
  1. 静态资源发布
gt
# 选择 [7] 一键发布
# 选择操作:
# - 编译完即推送
# - 编译完不推送
# - 不编译即推送
# - 不编译不推送

# 支持分支:
# - sandbox
# - staging
# - release_*
  1. 组件发布
gt
# 选择 [7] 一键发布
# 或 选择 [8] 自定义发布
# 选择发布环境:
# - sandbox
# - staging
# - release
  1. 超市仓库发布
gt
# 选择 [7] 一键发布
# 选择发布类型:
# - components
# - static

其他功能

  1. 状态查看
gt
# 选择 [s] 状态查看
# 显示:
# - 当前分支
# - 变更文件
# - 仓库状态
  1. 撤销操作
gt
# 选择 [5] 撤销代码
# 选择撤销类型:
# - 撤销最近提交
# - 重置到指定提交
  1. Shell 命令
gt
# 选择 [6] Shell 命令
# 输入要执行的命令

命令行参数

# 显示帮助信息
gt -h

# 查看版本
gt -v

# 直接执行 Git 命令
gt -c "status"

⚙️ 配置说明

仓库类型配置

支持以下仓库类型:

  • 普通仓库(normal)
  • 静态资源仓库(static)
  • 组件仓库(component)
  • 独立服务仓库(service)

环境配置

{
  "environments": {
    "dev": "开发环境",
    "test": "测试环境",
    "prod": "生产环境"
  }
}

📄 许可证

MIT License

🐛 问题反馈

如遇到以下问题:

  1. 命令执行失败

    • 检查 Git 环境配置
    • 确认当前目录是否为 Git 仓库
    • 查看错误日志
  2. 发布失败

    • 确认配置文件格式正确
    • 检查目标仓库权限
    • 验证分支映射关系

请在 GitHub Issues 中提交详细问题描述和复现步骤。

🌟 Star History

Star History Chart