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

mingit

v2.3.1

Published

An extremely minified git alias with tab completion

Downloads

51

Readme

An extremely minified alias for git commands with tab completion. Because who wants git commit -m "blah blah blah" to make every change?

Getting started

Installation

Using ohmyzsh? See Use mingit with Oh My Zsh

The below works out of the box for zsh on mac or bash on windows. If using bash on mac, change the value of use-mac-bash in [package.json] to true:

npm install -g mingit && source ~/.mingit.sh

** You must execute source ~/.mingit.sh or source ~/.zshrc if using zsh on mac, or open a new terminal, then you can try out the Commands below. **

Tested on Mac OS X El Capitan. If this doesn't work for you, see Manual Install

Commands

Supporting the minimal number of highly-used commands

g a .                      // git add .
g b other-branch           // git branch other-branch
g b which                  // git branch --show-current (note this assumes git version >= 2.22)
g c -m "made some changes" // git commit -m "made some changes"
g co master                // git checkout master
g d                        // git diff
g f                        // git fetch
g i                        // git init 
g m hotfix                 // git merge hotfix
g pll                      // git pull
g psh                      // git push
g r                        // git reset
g rsto                     // git restore
g s                        // git status

This doesn't destroy command line parameters, so for example typing

g psh origin magic      // pushes local to origin/magic

or any other number of parameters on different commands works as "git push origin magic" would. Also, since command line parameters are not destoryed, using g by itself instead of git followed by a command also works:

g stash                 // works just as well with any git subcommand

It also keeps tab completion. So when you want to switch to another branch, just

$ g co <TAB><TAB>
HEAD         master       second-branch   ORIG_HEAD

as you normally would.

Manual Install

Linux

If on linux, append [scripts/bashrc] to ~/.bashrc to use shortened commands.

cat ./.bashrc >> ~/.bashrc

Mac

For zsh:

  • Copy [scripts/zsh-mingit] to ~/.mingit.sh
  • Copy [scripts/git-completions.bash] to ~/.git-completions-mingit.sh

Then add the following to your ~/.zshrc file:

# start mingit #
zstyle ':completion:*:*:git:*' script ~/.git-completions-mingit.bash
autoload -Uz compinit && compinit -u
source ~/.mingit.sh
compdef g='git'
# end mingit #

For bash: Append the contents of [scripts/bash_profile] to your ~/.bash_profile:

cat ./.bash_profile >> ~/.bash_profile

Windows

If on windows, append [scripts/win-bashrc] to ~/.bashrc (create it if it doesn't exist) in your home directory (find home by echo $HOME on your git bash setup...probably /c/users/$USER).

Now use the mingit commands instead of the git commands to save tons of time while using git.

Uninstall

As of v7 of npm, uninstall scripts don't work :( However, you can easily uninstall this alias by running node scripts/uninstall.js before executing the below.

$ npm uninstall -g mingit