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

git-config-installer

v1.0.3

Published

git config installer

Downloads

9

Readme

git-config-installer

git config installer

完整内容:git-config-installer

git 配置文件为:~/.gitconfig,下文涉及到的配置便在该文件中

git alias 配置

有一个小技巧可以使你的 Git 体验更简单、容易、熟悉:别名。

Git 并不会在你输入部分命令时自动推断出你想要的命令。 如果不想每次都输入完整的 Git 命令,可以通过 git config 文件来轻松地为每一个命令设置一个别名。 这里有一些例子你可以试试:

br = branch
cm = commit
ck = checkout

这意味着,当要输入 git commit 时,只需要输入 git cm 随着你继续不断地使用 Git,可能也会经常使用其他命令,所以创建别名时不要犹豫。

可以看出,Git 只是简单地将别名替换为对应的命令。 然而,你可能想要执行外部命令,而不是一个 Git 子命令。 如果是那样的话,可以在命令前面加入 ! 符号。 如果你自己要写一些与 Git 仓库协作的工具的话,那会很有用。 我们现在演示将 git alias 定义为 git 查看别名的 的别名:

alias = ! git config --get-regexp ^alias\\. | sed -e s/^alias\\.// -e s/\\ /\\ =\\ /

我的完整别名配置如下

# 通过更友好的界面来查看日志
lg = log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit

# 简化 git status 的长度
st = status

# 使用 vimdiff 进行代码对比
dft = difftool -t vimdiff

# 简化 git 子命令 长度
br = branch
cm = commit
ck = checkout
cp = cherry-pick
cr = cherry -v
pom = pull origin master

# 于创建了查看别名的子命令,通过调用 git config 实现
alias = ! git config --get-regexp ^alias\\. | sed -e s/^alias\\.// -e s/\\ /\\ =\\ /

git 其他配置

另外,相较git内置对比工具,vimdiff更为强大、便利,一下配置是将对比工具进行了替换

[merge]
	tool = vimdiff
[diff]
	tool = vimdiff

git 配置安装器

如果想使用我以上的配置,可以直接想配置复制到.gitconfig文件中

另外,我也提供了安装工具,通过运行安装工具可以快速配置好以上功能

安装 git-config-installer

npm install -g git-config-installer

安装 git 配置

git_config_install

asdf.gif