Over the last few weeks, Frank and I had some spare time. As summer hadn’t yet arrived in Germany, we decided to spend that time coding… What came out is Gonsole, a plug-in for the Eclipse IDE which provides a Git Console. The features that we originally intended to implement are now in place and thus we found it is the right time to release v1.0.
Though we documented the development progress in the gonsole weeks article series, we still found it might be worth to summarize the key features here:
- Integrated into Eclipse
- Content assist and usage hints
- A command history
- Optional integration with EGit
- Multiple console sessions
- Git included – no need to have Git installed
In order make the plug-in easy to discover and install, it is available from the Eclipse Marketplace. If you want to give it a try, just drag the icon into your Eclipse:
If you prefer, you can also install Gonsole directly from this software repository: http://rherrmann.github.io/gonsole/repository/
Integrated into Eclipse
The Git console is an extension to the Eclipse Console View. A new console session can be created with the ‘Open Git Console’ action.
The prompt (
gonsole> here) indicates the current repository, i.e. the repository to which the entered command will apply to. It can be changed with the
use command. This command requires either the absolute path to the .git folder of a repository or the name of a registered repository as its only argument.
Repositories can be registered through EGit (see below) or on the Team > Git Console > Repository Location preference page.
Furthermore the workspace is kept in sync. When commands change the work directory (e.g.
merge) the affected workspace resources are refreshed to avoid stale resource state.
Ctrl+Space opens the content assist and shows usage information for the currently selected command.
Text that you have already typed or type while the content assist is open will filter the proposals that are shown.
Gonsole maintains a history of the most recently entered commands.
To bring up the history popup, you can use the same key as in the Unix shell: Arrow Up. As with the content assist, the list will be filtered as you type.
Integration with EGit
While Gonsole can be used standalone just fine, it is probably most valuable as an add-on for EGit. Therefore we offer an integration with EGit that can be installed optionally. If installed, the EGit Team menu shows an Open Console entry that opens a console session for the repository that the selected resource belongs to.
Furthermore all repositories known to EGit can be specified as an argument in the
use command. If, for example, there is a repository ‘foo’ shown in the EGit Repository View, you can switch to it with
Multiple Console Sessions
As mentioned earlier, the ‘Open Git Console’ action opens a new session each time. To switch between sessions, there is the ‘Display Selected Console’ drop-down.
To distignush different sessions, the console view is labelled with the name of the repository that is currently in use. This allows you to operate on multiple repositories while keeping their work log separate.
It is not necessary to have Git installed on your computer for the the Git Console to work. The plug-in uses JGit, a pure Java implementation of Git, to interact with the repository.
More about Gonsole
Please see the plug-in’s homepage for documentation and further details. If you found a bug or if you would like something to be improved, please file an issue. Or even better, open a pull request that fixes what is missing or broken.