TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Announcing gitsh: A dedicated shell for git commands

95 pointsby creativityhurtsover 11 years ago

16 comments

mvangaover 11 years ago
Do we really need a shell for this? If you&#x27;re reusing some of these so often, why not just alias them in your bashrc? The interactive shell requires way more key-presses than any of my aliases not to mention sticking me into a shell that I need to exit out of later to get back to my development environment.<p><pre><code> $ cat ~&#x2F;.bashrc | grep git alias gitc=&#x27;git commit -a -s&#x27; alias gitls=&#x27;git log --pretty=oneline&#x27; alias gitb=&#x27;git branch&#x27; alias gitca=&#x27;git commit -a --amend&#x27; alias gits=&#x27;git status&#x27;</code></pre>
评论 #7212201 未加载
评论 #7212097 未加载
mickeypover 11 years ago
Even if you&#x27;re not an Emacs user I recommend you try out Magit inside Emacs. (And if you do use Emacs, you should definitely use it.)<p>I wrote an introduction to Magit a while back. Magit has a very simple and understandable &quot;context menu&quot; interface that gives you access to <i>all</i> of Git&#x27;s functionality, and then some. In other words, it&#x27;s not a pared-down environment like a lot of frontends.<p><a href="http://www.masteringemacs.org/articles/2013/12/06/introduction-magit-emacs-mode-git/" rel="nofollow">http:&#x2F;&#x2F;www.masteringemacs.org&#x2F;articles&#x2F;2013&#x2F;12&#x2F;06&#x2F;introducti...</a>
评论 #7216762 未加载
m4r71nover 11 years ago
I&#x27;ve been using Ryan Tomayko&#x27;s git-sh [1] for years. It provides very similar functionality and consists of just a handful of Bash scripts.<p>[1] <a href="https://github.com/rtomayko/git-sh" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;rtomayko&#x2F;git-sh</a>
akerl_over 11 years ago
This is definitely interesting, and I might check it out for the couple of times a week that I have to do complicated stages of commits or rebasing.<p>Generally speaking, though, I love git because I don&#x27;t have to break out from my normal flow to use it.<p>My use case is potentially very different since most of my projects under version control are personal &#x2F; single_committer, but I&#x27;ve saved myself some of the typing by aliasing common git commands to short codes: &#x27;git add&#x27; becomes &#x27;ga&#x27;, &#x27;git commit&#x27; == &#x27;gc&#x27;, &#x27;git push&#x27; == &#x27;gp&#x27;. That way, committing&#x2F;pushing a bug I&#x27;ve just fixed becomes `gc -am &#x27;$message&#x27; &amp;&amp; gp`.
kenny_rover 11 years ago
I prefer native system packages to tarballs, so here&#x27;s a script [1] to generate .deb and .rpm packages using Jordan Sissel&#x27;s FPM [2] (gem install fpm).<p>[1] <a href="https://gist.github.com/rasschaert/8915657" rel="nofollow">https:&#x2F;&#x2F;gist.github.com&#x2F;rasschaert&#x2F;8915657</a><p>[2] <a href="https://github.com/jordansissel/fpm" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;jordansissel&#x2F;fpm</a>
stdbrouwover 11 years ago
What would also be neat: a &quot;generate a shell on demand&quot; command. So `use git` would give you something that&#x27;s about 90% of gitsh, but equally `use apt-get` would do the same thing for apt and so on.<p>But perhaps we&#x27;re getting a little bit carried away here, for a couple of keystrokes :-)
评论 #7211631 未加载
platinumdragonover 11 years ago
It looks nice with the syntax coloring, and it&#x27;s obvious a good amount of work went into it, but I personally don&#x27;t see a clear benefit to altering my workflow to save what appears to literally be a couple of characters over a transaction.<p>What might be interesting is being able to import and export configurations to standardize git usage across multi-coder projects?
mateuszfover 11 years ago
I see one problem with it .. how do I launch vim and other shell commands?<p>ctrl+z and using other terminals is ok, but it&#x27;s not the same thing.
captn3m0over 11 years ago
Another similar project (which I use) is scm breeze, which sets up tons of useful aliases for various git commands. It gives you much cleaner git status and log outputs, which allows you do things like `ga 1 3 5` to add files numbered 1,3,5 to the index without typing in file names.<p>[1]: <a href="https://github.com/ndbroadbent/scm_breeze" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;ndbroadbent&#x2F;scm_breeze</a>
xiaqover 11 years ago
Interesting, but if I were the author I would definitely avoid the name &quot;gitsh&quot; since some googling reveals there have been prior arts under exactly the same name: <a href="https://github.com/caglar/gitsh" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;caglar&#x2F;gitsh</a> <a href="https://gist.github.com/aristus/2304335" rel="nofollow">https:&#x2F;&#x2F;gist.github.com&#x2F;aristus&#x2F;2304335</a>
Bjoernover 11 years ago
The only thing which I personally found interesting was the empty enter command shows git status.<p>Here is something like that for zsh in case you need it.<p><a href="https://gist.github.com/anonymous/0aa22dc97ef832f88026" rel="nofollow">https:&#x2F;&#x2F;gist.github.com&#x2F;anonymous&#x2F;0aa22dc97ef832f88026</a>
Myrmornisover 11 years ago
<p><pre><code> Of all the Git commands, I find myself using git status most often </code></pre> I literally never use status. It&#x27;s faster to use a shell prompt that displays uncommitted &#x2F; untracked files.
madleeover 11 years ago
I can definitely see myself using this. I generally have one terminal tab open just for git anyways, so this would fold into my workflow nicely.
ktzarover 11 years ago
Nothing that a couple of aliases can&#x27;t do...
评论 #7211016 未加载
andyhmltnover 11 years ago
Seems pretty good! Would love to use it but it&#x27;s giving me an error about not having &gt;Ruby 2.0 (I use RVM)
评论 #7210772 未加载
JBiserkovover 11 years ago
Cool.<p>What about Windows?