News for hackers. Stuff that matters.
Re:Gitjk – command to undo what you just did in git by _kst_ on Monday May 26, 2014 @04:25PM (#7801439)
If you name it "git-jk" rather than "gitjk", you can invoke it as

  git jk
Re:Gitjk – command to undo what you just did in git by bodyfour on Monday May 26, 2014 @06:34PM (#7801958)
The gitjk command needs to operate as a shell alias though
Re:Gitjk – command to undo what you just did in git by couchand on Monday May 26, 2014 @04:42PM (#7801537)
Is that specific to git or is it in the shell?
Re:Gitjk – command to undo what you just did in git by pyre on Monday May 26, 2014 @05:05PM (#7801626)
All of the:

  git <command>
commands are executables of the form 'git-<command>' in specific directory:

  $ git --exec-path
  /usr/local/Cellar/git/1.9.0/libexec/git-core 

  $ ls $(git --exec-path) | head
  git
  git-add
  git-add--interactive
  git-am
  git-annotate
  git-apply
  git-archimport
  git-archive
  git-bisect
  git-bisect--helper
In git's earlier years, it was just a set of git-<command> commands in $PATH, until the master git command was created (to 'rule them all' if you will).

git will actually pick up anything in $PATH of the form 'git-<command>' and allow you to run it as 'git <command>'. The downside of this, is that commands of the form:

  git <command> --help
are intercepted by git and converted to:

  man git-<command>
So your command cannot process the --help option itself when called like this (or it used to be this way a couple of years ago).

Edit: Another downside, is that some 'smart' command-line completion settings either have a hard-coded list of 'git <command>' commands, or look for said commands in the value returned by 'git --exec-path'. So you can't tab-complete git-<command> commands that you just drop into $PATH (at least not out of the box).

Re:Gitjk – command to undo what you just did in git by taejo on Monday May 26, 2014 @04:55PM (#7801590)
It is specific to git.
Re:Gitjk – command to undo what you just did in git by kolev on Monday May 26, 2014 @06:45PM (#7801996)
Git.