Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <h2>Real life examples</h2> <p>Looking around, there are a lot of projects which extend Git command line:</p> <ul> <li><code>git-wtf</code> (written in Ruby) uses brew or manual installation to put an executable in <code>/usr/bin</code> (or was it <code>/usr/local</code>?). And it seems like Git has a mechanism which knows that when you write <code>git wtf</code> it is actually looking for any script in PATH named <code>git-wtf</code>.</li> <li><code>git-annex</code> (written in haskell) has a more complex flavor. But even if it uses Cabal for its installation (and has a long list of dependencies if you don't have it), it seems like its using the same basic principle as git-wtf. (Git will find it in the executable path as you write <code>git annex</code>)</li> <li><code>git-flow</code> (written in shell) uses brew/macport/apt-get/wget+bash to install itself. And, once again, it seems to use the same mechanism.</li> </ul> <h2>Solution (?)</h2> <p>So it's certainly possible to write your own custom script and then make it available by placing it in any paths listed in your PATH variable.</p> <p>But as far as I know, there is a few shortcomings...</p> <h2>Known Issues</h2> <h3>The documentation</h3> <p>You are not really extending Git, and so, some commands are not working:</p> <pre><code>$ git help wtf No manual entry for git-wtf $ git wtf --help No manual entry for git-wtf $ git wtf -h # the only command which works... Usage: git wtf [branch+] [options] ... </code></pre> <p>I didn't try it on git-annex so they may have worked around this issue, but git-flow and git-wtf follow this behavior.</p> <p><strong>EDIT</strong>: <code>git help</code> fallback to the man pages, so this point is sort of unrelated (Thx Eric).</p> <h3>The installation process</h3> <p>Installation by Brew, macports and apt-get are amazing. But there is no globally accepted way of adding features to Git. More specifically, you have no platform independent way of installing your "plugins". Maybe <code>make</code> would do the trick, but even then you would have to write an installation script yourself.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload