Users can now avoid typing Git over and over again with a new interactive shell dedicated to Git commands: gitsh. Created by Ruby on Rails development and consulting firm thoughtbot, gitsh allows users to issue any Git commands, instead of having to run Git commands in general-purpose shells like Zsh or Bash.
“Many of the early Unix utilities, like dc, didn’t take sub-commands like Git and other modern programs do. Instead they launched a shell,” according to thoughtbot’s blog. “For a program like Git, which has so many commands and options, interacting via a shell still makes a lot of sense, and so gitsh follows in this long Unix tradition.”
gitsh was born over a lunch conversation on whether the classic Unix way or the modern sub-command way was more intuitive. After the discussion, Mike Burns, a thoughtbot developer and one of the primary developers on gitsh, thought about it some more and ended up creating a Git shell written in Python.
“I tried using this for a few days, and very quickly found it a much more comfortable way of using Git,” said George Brocklehurst, a thoughtbot developer and one of the primary developers of gitsh. “I started hacking in extra features, like tab completion, in my Friday investment time, and eventually started from scratch with a new version written in Ruby.”
The interactive Git shell is similar to a general-purpose shell, but the sole focus is on Git tasks.
“The focus lets us integrate more deeply with Git than you’d necessarily want to in a general-purpose shell,” said Brocklehurst. “By having a Git-aware environment, there’s a lot of potential to take advantage of a tool that understands the state of the repository.”
gitsh features include:
Status: gitsh allows a user to check his or her status after any command. All a user has to do is hit return without entering a command.