- Notifications
You must be signed in to change notification settings - Fork13
Undo what you just did in git
mapmeld/gitjk
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
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.
Asking for undo-ing advice.
git initgitjkThis created a .git folder in the current directory. You can remove it.rm -rf .gitAsking to fix it automatically
git add file.jsgitjk -fThis added file.js to the changes staged for commit. All changes to file.js will be removed fromstaging for this commit, but remain saved in your file.Running... git reset file.jsCompletedadd,archive,branch,cat-file,checkout,clone,commit,diff,fetch,grep,init,log,ls-tree,merge,mv,pull,push,remote,revert,rm,show,stash,statusBasicaliases are also supported (e.g.git cm forgit commit).
bisect,fsck,gc,prune,rebase,reset,tagCompound aliases are not supported (e.g.git ac forgit add -A && git commit).
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.
npm install -g gitjkalias gitjk="history 10 | tail -r | gitjk_cmd"npm install -g gitjkalias gitjk="history 10 | tac | gitjk_cmd"If you are usingfish, place this is in~/.config/fish.config (fromlunixbochs on Hacker News):
alias jk="history | head -n+10 | tail -r | gitjk_cmd"If you are usingiTerm
alias gitjk="history | tail -r -n 10 | gitjk_cmd"Available under GPLv3 license
About
Undo what you just did in git
Topics
Resources
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Releases
Packages0
Uh oh!
There was an error while loading.Please reload this page.
Contributors4
Uh oh!
There was an error while loading.Please reload this page.