Question

Well I have tried countless variations of :

git config --global alias.gg '!gitk --all &; git gui &'

but they do not work or just display only gitk like this one :

[alias]
    gg = !gitk --all& ; git gui&
Was it helpful?

Solution

I had some fun trying to get this to work, here's what I came up with

I don't have gitk or git gui in my environment to test your actual command, but from my experiments I would suggest you try:

gg = !sh -c ": ; (gitk --all &) ; (git gui &)"

Here's one I did get working on my box with some explanation...

gg = !sh -c ": ; (qgit &) ; echo b ; echo c"

To shell, ":" is a NOP, I had to put this in because the first command was always being ignored, so have at you bash - ignore my ignore. i.e. when I tried "echo a ; echo b ; echo c" I would only get b and c output.

Secondly, the & was not working unless I put the whole subcommand in a subshell. i.e. if you remove the brackets you get a syntax warning.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top