Skip to content
Branch: master
Go to file
Code
This branch is 73 commits behind mapmeld:master.

Latest commit

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 

README.md

gitjk

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.
sudo rm -r .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 rm -r --cached file.js
Completed

Coverage

Included:

add,
checkout,
clone,
commit,
diff,
fetch,
grep,
init,
log,
merge,
mv,
pull,
push,
remote,
rm,
show,
status

Not included:

bisect,
branch,
rebase,
reset,
tag

Install

You can't just npm install! The module is named gitjk but you can set up an alias for it to pipe the last command 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"

License

Available under GPLv3 license

About

Undo what you just did in git

Resources

Releases

No releases published
You can’t perform that action at this time.