Git Extensions from console – UPD

A long time ago I’ve blogged how to run Git Extensions from console

I didn’t like the fact I had to create some extra files.

I build a simpler implementation using aliases

git config alias.ex "!'C:\Program Files (x86)\GitExtensions\GitExtensions.exe' "$@""

Now I can use my lovely

git ex

# or even
git ex commit

# for list of all commands
git ex help


I found that my new approach is wrong. It blocks console while Git Extensions is open.
That’s very bad.
I had to improve the command and I had to change it dramatically. And I had to fight with escaping.

So here we are now

git config --global alias.ex '!sh -c ''\"C:\\Program Files (x86)\\GitExtensions\\GitExtensions.exe\" ''$@'' &'''

I made the alias as global because it does not make sense to reconfigure it for all repos over and over

About mnaoumov

Senior .NET Developer in Readify
This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s