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 🙏

© 2026 – Pkg Stats / Ryan Hefner

@supos-ce-platform/git-tools

v0.0.5

Published

Supos ce platform Git tools, supos, ce, platform, git tools

Downloads

29

Readme

Git Merge Tools

这是一个用于处理git merge相关操作的工具包,专门为monorepo项目设计。

功能特性

  • 分支合并管理
  • 跨仓库分支合并
  • 远程分支直接合并
  • 冲突解决辅助
  • 合并历史查看
  • 合并撤销操作

安装

pnpm add @supos-ce-platform/git-tools
npm -g install @supos-ce-platform/git-tools

使用方法

基本分支合并

import { GitMergeTools } from '@supos-ce-platform/git-tools';

// 初始化工具实例
const gitTools = new GitMergeTools('/path/to/repo');

// 合并分支
await gitTools.mergeBranch('feature', 'main');

远程分支合并

import { MultiRepoMerge } from '@supos-ce-platform/git-tools';

// 初始化工具实例
const multiRepoMerge = new MultiRepoMerge();

// 合并远程分支(优化版本)
await multiRepoMerge.mergeRemoteBranches(
  'source-repo',     // 源仓库名称
  'feature-branch',  // 源分支名称
  'target-repo',     // 目标仓库名称
  'main',            // 目标分支名称
  {
    showDiff: true,           // 显示将要合并的差异
    conflictStrategy: 'ours',  // 冲突解决策略:'ours'使用我们的更改,'theirs'使用他们的更改
    push: true                // 是否推送合并结果
  }
);

API文档

GitMergeTools

mergeBranch(source: string, target: string): Promise

合并源分支到目标分支

abortMerge(): Promise

中止当前的合并操作

resolveConflicts(strategy: 'ours' | 'theirs'): Promise

使用指定策略解决冲突

MultiRepoMerge

mergeRemoteBranches(sourceRepo: string, sourceBranch: string, targetRepo: string, targetBranch: string, options?: object): Promise

合并两个远程分支,更专注于远程分支合并,减少了本地分支操作

参数:

  • sourceRepo: 源仓库名称
  • sourceBranch: 源分支名称
  • targetRepo: 目标仓库名称
  • targetBranch: 目标分支名称
  • options: 合并选项
    • showDiff: 是否在合并前显示差异
    • conflictStrategy: 合并冲突时的自动解决策略 ('ours' | 'theirs')
    • push: 是否推送合并结果

mergeCrossBranch(sourceRepo: string, sourceBranch: string, targetRepo: string, targetBranch: string): Promise

跨仓库合并分支(原始方法)

abortMerge(repo: string): Promise

中止指定仓库的合并操作

resolveConflicts(repo: string, strategy: 'ours' | 'theirs'): Promise

使用指定策略解决指定仓库的冲突