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

gitjk

v0.1.14

Published

undo or explain how to undo last git command

Downloads

23

Readme

gitjk

Greenkeeper badge

If you just ran a git command that you didn't mean to, this program will either undo it, tell you how to undo it, or tell you it's impossible to undo. Based on a joke I posted a while ago.

Examples

Asking for undo-ing advice.

git init
gitjk

This created a .git folder in the current directory. You can remove it.
rm -rf .git

Asking to fix it automatically

git add file.js
gitjk -f

This added file.js to the changes staged for commit. All changes to file.js will be removed from
staging for this commit, but remain saved in your file.
Running... git reset file.js
Completed

Coverage

Included:

add,
archive,
branch,
cat-file,
checkout,
clone,
commit,
diff,
fetch,
grep,
init,
log,
ls-tree,
merge,
mv,
pull,
push,
remote,
revert,
rm,
show,
stash,
status

Basic aliases are also supported (e.g. git cm for git commit).

Not included:

bisect,
fsck,
gc,
prune,
rebase,
reset,
tag

Compound aliases are not supported (e.g. git ac for git add -A && git commit).

Install

You need to run npm install and alias to fully install. The module is named gitjk but you need to set up an alias to pipe the most recent commands into the program.

OSX or BSD

npm install -g gitjk
alias gitjk="history 10 | tail -r | gitjk_cmd"

Ubuntu / other Linux

npm install -g gitjk
alias gitjk="history 10 | tac | gitjk_cmd"

Different Terminals

If you are using fish, place this is in ~/.config/fish.config (from lunixbochs on Hacker News):

alias jk="history | head -n+10 | tail -r | gitjk_cmd"

If you are using iTerm

alias gitjk="history | tail -r -n 10 | gitjk_cmd"

License

Available under GPLv3 license