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

platano-git

v0.2.0

Published

A tool for simplifying git operations

Downloads

669

Readme

简体中文 | English

platano-git

一个用于简化 git 操作的工具

使用指南

安装

使用 npm

npm install platano-git -g

使用 yarn

yarn global add platano-git

适用 pnpm

pnpm add -g platano-git

* 通过运行 platano -v 0.2.0+ 或者 platano --version 查看是否安装成功

示例

# 查看本地分支
platano br

# 推送代码
platano ps

# 拉取代码
platano pl

# 切换到main分支
platano ck main

命令

br

| 参数| 描述 | 等价命令| 备注 | | --- | --- | --- | --- | | [branch] | 查看所有本地分支或创建新分支 | git branch | 如果不输入任何内容(platano br),控制台将输出完整的本地分支信息。 如果输入一个分支(platano br xxx),它将创建一个名为xxx的新分支。 请注意,此命令不会自动切换到新创建的分支。| | -a | 查看所有分支 | git branch -a | | -v | 查看本地仓库中所有分支的详细信息 | git branch -v | | -m [branch] | 重命名本地分支 | git branch -m xxx yyy | 如果不输入任何内容(platano br -m),会提示您选择基准分支,输入新分支名。 如果输入一个分支(platano br -m xxx),会将当前分支重命名为xxx | | -d | 删除本地分支 | git branch -D xxx | 会强制删除分支 | | -r | 删除远程分支 | git push origin --delete xxx | | -dr | 删除本地和关联的远程分支 | git branch -D xxx && git push origin --delete xxx |

ck

| 参数| 描述 | 等价命令| 备注 | | --- | --- | --- | --- | | [branch] | 切换分支 | git checkout xxx | 如果输入分支,如platano ck main,将切换到 main 分支。 如果不输入任何内容(platano ck),将得到一个单选列表,可以在其中选择想要切换到的分支,选择一个分支后将切换到该分支。 | | -b [branch] | 创建新分支并切换到此分支 | git checkout -b xxx yyy | 如果输入分支,例如 platano ck -b feat-xxx,然后从分支列表中选择基准分支,它将基于选择的基准分支创建一个新分支 feat-xxx。 如果不输入任何内容(platano ck -b),它会提示需要输入新分支名称,然后选择基准分支,基于选择的基准分支创建一个新分支并切换到此分支。 |

sw

| 参数| 描述 | 等价命令| 备注 | | --- | --- | --- | --- | | [branch] | 切换分支 | git switch xxx | 如果输入分支,如platano sw main,将切换到 main 分支。 如果不输入任何内容(platano sw),将得到一个单选列表,可以在其中选择想要切换到的分支,选择一个分支后将切换到该分支。 | | -c [branch] | 创建新分支并切换到此分支 | git switch -c xxx yyy | 如果输入分支,例如 platano sw -c feat-xxx,然后从分支列表中选择基准分支,它将基于选择的基准分支创建一个新分支 feat-xxx。 如果不输入任何内容(platano sw -c),它会提示需要输入新分支名称,然后选择基准分支,基于选择的基准分支创建一个新分支并切换到此分支。 |

* 此命令的最低 git 版本为 2.23

pl

| 参数| 描述 | 等价命令 | | --- | --- | --- | | | 拉取最新远程代码 | git pull | | -s | 选择远程名称并拉取远程分支| git pull xxx yyy |

ps

| 参数| 描述 | 等价命令| | --- | --- | --- | | | 推送代码| git push | | -o | 将代码推送到远程分支 | git push origin xxx | | -f | 强制推送代码 | git push origin xxx -f | | -u | 推送并关联远程分支 | git push --set-upstream origin xxx |

反馈

如果遇到了问题或有好的想法和建议,请在此 报告

许可证

MIT