gitjk

Undo what you just did in git

  • 所有者: mapmeld/gitjk
  • 平台:
  • 許可證:
  • 分類:
  • 主題:
  • 喜歡:
    0
      比較:

Github星跟蹤圖

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

主要指標

概覽
名稱與所有者mapmeld/gitjk
主編程語言JavaScript
編程語言JavaScript (語言數: 1)
平台
許可證
所有者活动
創建於2014-05-26 05:26:04
推送於2020-07-17 01:51:45
最后一次提交
發布數0
用户参与
星數824
關注者數12
派生數13
提交數89
已啟用問題?
問題數11
打開的問題數6
拉請求數28
打開的拉請求數0
關閉的拉請求數0
项目设置
已啟用Wiki?
已存檔?
是復刻?
已鎖定?
是鏡像?
是私有?