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 🙏

© 2024 – Pkg Stats / Ryan Hefner

@lgfe/git-mg-cli

v1.0.4

Published

auto merge cli for git

Downloads

2

Readme

git-mg-cli

🚀 (Auto) Merge CLI

Auto Merge CLI 是一个功能强大的命令行工具,旨在帮助开发者自动拉取代码、合并分支、推送远程等等操作。

👀 使用示例

背景:假设你完成了功能分支feature/a的开发,想要合并到测试分支dev,并且推到远程。

一般我们的操作步骤是:

# 切换到 dev 分支
git checkout dev

# 下拉 dev 分支的远程代码
git pull

# 合并功能分支 feature/a 到 dev
git merge feature/a

# 推送 dev 分支到远程仓库
git push

以下是使用 Auto Merge CLI 的简单示例命令:

# 处于 feature/a 分支中
lmg dev

上述会按顺序进行如下操作:

  1. 在当前分支执行git pull
  2. 获取当前分支的名称
  3. 切换到目标分支dev
  4. 执行git pull
  5. 合并分支
  6. 询问是否要推到远程
  7. 询问是否要切回源分支

⌛️ 安装

全局安装

npm install -g @lgfe/git-mg-cli

# 或者
# yarn global add @lgfe/git-mg-cli

💡 具体用法

Usage:
  $ lmg [target_branch]

Commands:
  [target_branch]  merge current branch into target_branch

For more info, run any command with the `--help` flag:
  $ lmg --help

Options:
  -h, --help     Display this message
  -v, --version  Display version number

Examples:
lmg master    把当前分支自动合并到master

假设你当前项目所在的分支为:feature/a,你想要把这个分支合并到dev,并自动上传到远程仓库,你只需要执行以下命令:

lmg dev

⏳ 调试方式

使用 pnpm link 对当前项目链接到电脑的全局环境上,如果是在项目的根目录,则执行以下命令:

注意:如果你的电脑已全局安装@lgfe/git-mg-cli,则需要先删除全局包,再 link

pnpm link --global --dir packages/mg-cli

如果想要解除 link,只需要 全局删除即可:

pnpm un -g @lgfe/git-mg-cli