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

git-auto-config

v0.0.5

Published

Auto config diffient user.name and user.email in different git repos

Downloads

8

Readme

git-auto-config

Auto config diffient user.name and user.email in different git repos.

✨✨✨ Don't worry about forgetting to switch git info again!!!.

Why?

There is always a need to use a different user.name and user.email in different git repos. For example, your company's repo want to use your company's username and email, but your personal repo want to use your personal name and email.

How?

Firstly, you need to config your rules by gitp p -r xxx -a xxx. Then, when you clone a repo by gitp clone, it will use your rules and auto to exec git config --local xxx.

Usage

Install

npm install -g git-auto-config

# or

yarn global add git-auto-config

# or

pnpm install -g git-auto-config

Alias(!important)

# mac
alias git="gitp"

# window
to google~

config your git rules

only config once

# match git repository url contains `github`
gitp p -r "github" -a "name1 <[email protected]>"

# match git repository url contains `gitlab`
gitp p -r "gitlab" -a "name2 <[email protected]>"

clone your git repository

# Then this repository will be auto config --local user.name and user.email use `name1 <[email protected]>`
gitp clone https://github.com/xxx/xxxx.git

# Then this repository will be auto config --local user.name and user.email use `name2 <[email protected]>`
gitp clone https://gitlab.com/xxx/xxxx.git

config old project

# Provided that you have already configed your git rules by `gitp p xxx`

gitp s

gitp commands

proxy | p

add git proxy rules

  • -r, --rule <rule>
  • -n, --name <name>
  • -e, --email <email>
  • -a, --author <author>

e.g.

gitp p -r github -a "name1 <[email protected]>"

# or

gitp p -r github -n name1 -e [email protected]

set | s

manual set current project(Make sure you had set the rule by gitp p xxx)

e.g.

gitp s

# or

gitp set

proxy-show | ps

show your config

  • -l, --list
  • -r, --rule <rule>

e.g.


# show rule `github` config
gitp ps -r github

# show all
gitp ps

proxy-delete | pd

delete your config

  • [...rules]
  • -a, --all

e.g.


# delete rule `github` and `gitlab`
gitp pd github gitlab

# delete all
gitp pd -a

-v | -h

e.g.

gitp -v

gitp -h

gitp p -h

gitp ps -h

gitp pd -h

git commands

Of course, you can continue use all the git command by gitp xxx, that's the same with git.

LICENSE

MIT License © 2022-PRESENT ChpShy