A Dedicated Shell For Git Commands
Nw submitter CMULL writes "Stop typing Git over and over again. Ruby on Rails development and consulting firm thoughtbot created an interactive shell dedicated to Git commands, gitsh. One of the primary developers says there is a need for this shell because many early Unix utilities don't take sub-commands like Git."
Is it gitish or gitsh?
It doesn't work.
alias gstatus='git status'
alias gcommit='git commit'
Or whatever other commands you want? I don't see the need for a purpose built shell when aliases would work just fine?
Some people just want to overengineer things I guess...
I am using git all the time. But most of the time, I am doing less than 5 different commands. Why would you need a shell for that?
Betaaaa!!!! I hate theeeee!!!!!
The developer in the article does not "say there is a need for this shell because many early Unix utilities don't take sub-commands", as the summary says. Rather, he motivates the idea of gitsh by comparing it to utilities which act in a shell-like manner (he picks dc as an example): if it works for them, why not for git too?
The first version (from the summary) makes no sense; the second version (from the article) seems like a reasonable argument to me.
Rather than fucking beta, how about we try to get the fucking summaries correct?
Or you could just use an IDE like Vim, Eclipse, NetBeans, etc. that can handle git via plugins. If you are using git enough that you need an interactive shell, you might as well just integrate it with your development enviroment.
Does it run on linux?
Effort-wise, switching into and out of a git-specific shell just to save those three letters is a huge hassle and not worth it. (The tab completion thing is not an advantage; regular git already does that in bash.)
For any actual development work you'll keep using both git and non-git commands; opening text editors, diffing and patching outside git, running scripts and shell snippets or sed commands. How do you pass those out of the git shell? Using an exclamation mark, like in ed? That really just inverts the problem, adds the problem of remembering whether you're currently in gitsh or bash, and adds confusion between the two environment variable scopes.
> echo -n "GitShell:"
> read command
> git $command
> done
Well that was easy!
So we're taking issue with interface design so that we can convince people that a wrapper around an existing tool is actually worth paying attention to instead of . . . y'know . . .actually contributing something?
They have to build a custom shell so that later it can be hosted as a service.
My turnips listen for the soft cry of your love
Web developer here and used git for last 2 years on a daily basis.
Gitsh looks promising, but I will hold my verdict until I use it for an extended period, and see how it can improve my work life.
Currently I use a combination of SmartGit and Git Bash. SmartGit is mainly used in visualizing branch history, resolve conflicts, tagging and do some odd jobs here and there e.g. edit message of the last commit. Git Bash is used for checking out branches, merging, pulling, pushing sort of stuff i.e. any operation that is more straight forward on the command line, which I happened to feel "clunky" on SmartGit.
Overall, my underline philosophy is, developers should not spend lot of time in version control related tasks, rather should resort to many tools if necessary to expedite it and move on with tackling big problems i.e. features, bug smashing, optimising.
If it doesn't, I don't see how it saves much typing.
$ vim -p file1.c file2.c file3.c ./a.out
$ make
$
$ gitsh
@ add file1.c file2.c file3.c
@ commit -m 'some crap'
@ ^D
$ vim -p file1.c file2.c file3.c ./a.out
$ make
$
$ git add file1.c file2.c file3.c
$ git commit -m 'some crap'
Net savings of what, one keypress? It's rare for me to issue more than one or two git commands without issuing a non-git command. Unless the intention is to have a seperate shell up that you switch to whenever you need to do get stuff, maybe?
I tried to install it and verify for myself, but it required a newer version of Ruby than is available on my distribution. (Thanks, Canonical.)
Good idee, and it works too, but TFA is not the first attempt at doing so: https://github.com/rtomayko/git-sh
I have been this rtomayko's solution for a year now, and the shell combined with a decent set of shorthand aliases that come with the shell, do improve my workflow a lot. I can recommend it to anyone who uses git on a daily basis.
I have been using Giteye ( http://www.collab.net/giteyeap... ) to manage my git repositories, it is very powerful and full featured. I particularly like its merge tool. I don't type git commands anymore except when I am making some kind of script that needs to get stuff into or out of git. It also integrates painlessly with github and many other Issue tracking tools.
There are a few disadvantages in using it though:
1) You have to learn how to do stuff you already know how to do in the CLI (mildly annoying).
2) You need to create a free account on a service to continue using it after a month (a little annoying).
3) It is build on top of eclipse though, so it consumes a few hundred megabytes of memory (very annoying if you have an underpowered machine).
There is already a git-sh . It even have a debian package included on the main repos.
If Git wasn't a steaming pile of shit, kind of like Beta.
alias such=git
alias very=git
alias wow='git status'
Technically, it's 3 letters but 4 characters.
Unless yous shell will somehow interpret gitfcommit as 'git commit' ;)
... aliases are not new. you must come up with something newish to hit the headlines.
I don't want to pay for the overhead of a full fledged GUI. I like the speed of command line thank you very much. But picking the check sum to do cherry picks is a pain. Especially for me stuck in a stupid cygwin terminal in a Win7 box.
Developing the idea further, some kind of graphical/mouse pick from the output of git log --format="%h %an %s" origin/master..my_bug_fix_branch in a regular console window would be great. I would like to right-click on a line in a console window and get a context menu under the mouse cursor. The line under the cursor should be parsed and broken into %d %n %an etc be available to the git commands in the context menu.
sed -e 's/Chuck Norris/Rajnikant/g' joke > fact
As others have commented I think this idea can be covered with some simple aliases in bash, seems a tad silly.
What I wish was available was a way to view the source of a git with one minor enhancement - the ability to browse with a click to the declaration/definition of functions/variables a la the IDE of your choice. Would be neat to be able to build an index using some tool, check it into the root of your repo, and then have the site use the index to mark up the source code with the appropriate links.
I've dug around for something that does this but haven't found anything suitable - anyone know of anything?
while [ 1 ]; do echo -n -e "\xe2\x95\xb$((($RANDOM&1)+1))"; done
So is it too late to make a comment saying one should make their own shell, with blackjack and hookers, only forget the shell and the blackjack?
Bash is very good, but much could be done to craft a better command shell that combines the best of Bash, Perl, Ruby and Python, with the only bit of Visual Basic that I really liked: the with construct.
In Visual Basic, one could write .this := that .and := other
with myObject
end with
The dots at the start are redundant given proper block structure, unless you also have a smalltalk like messaging facility that runs aside C++ style getters and setters. Then .this = that style constructs would do low level get and set, and
with git
init
add .
commit -m "initial commit"
end
which is fine provided 'git end' has no meaningful value to git.
I'm also thinking about the consequences of replacing the environment with stacks of dictionaries, and playing with simple prototypes in Python, sometimes just half writing them to help me see how the code would look.
John_Chalisque
The mistake with the thesis of the authors is to think that little tools with built in shells to handle subcommands (dc, ftp etc) are generally not horrible. They are horrible and reproducing their interface mistake for git is also a mistake of the same type.
I should use this sig to advertise my book ISBN-13 : 978-1501515132.
Does it support completion of git commands like bash does with some bash_completion functions?
Who types commands? I use the up arrow. (I use svn, not git, but it's the same thing.) Type it once, and use command-line recall.
The command line is great but sometimes a GUI comes along and makes things so much easier, especially to cherry pick.
gitg
ayottesoftware.com
Seems to work out of the box in debian jessie and Ubuntu 12.04+ at the very least. It installs a script in /etc/bash_completion.d/git that reads the branch list straight from the .git/ subfolder in the current repository.
Shazbot! We ran into some trouble getting the comments.
Try again... na-nu, na-nu!
FUCK BETA!
While they are at it, they should make a shell so we don't have to type sudo all the time.
Bonus points if they make it so I don't have to type "bash -c" in front of all my commands.
OpenGrok
<xml><I><am><so><damn>Web 2.0</damn></so></am></I></xml>
Sounds like plain old etags/ctags. You may have to look at the commit from inside your editor though for that to work, e.g. an Emacs M-x shell.
Yeah, I really want to be able to do it right in the browser - I started wanting it the other day when I was sitting in the waiting room at my kid's ballet class and trying to debug an issue on my phone by looking at the code on github.com. It would have been 100 times easier if I'd been able to click on method names/classes and jump to the declarations, or even search for references right in the browser. Wondering if I can find where/how eclipse stores it's project indices and roll my own...
Thanks for the reply!
while [ 1 ]; do echo -n -e "\xe2\x95\xb$((($RANDOM&1)+1))"; done