XDoc

Working with Git from Glamorous Toolkit

Just like in Pharo, in Glamorous Toolkit we manage code through Git.

Managing Git repositories loaded through scripts

We usually load external code through the Metacello configuration management engine by running a script like:

Metacello new
  baseline: 'Faker';
  repository: 'github://feenkcom/faker/src';
  load.

Side note: before loading, don't forget to setup the ssh keys properly.

This clones the repository on the local disk, and loads the code in the image. To manage these cloned repositories, you can use the git tool that can be opened from the home tab.

The git tool from the home tab
The git tool from the home tab

The first thing we see is the list of cloned repositories and their current state.

Git Repositories
Git Repositories

When we’re ready to commit, we can make a final review in the Changes view and then use the Commit button. It opens a nice little dropdown editor where we can fill in ... you’ve guessed it ... the commit message.

Commit message
Commit message

Now the repository status should report 1 not published. To sync with the remote, we can use the Fetch, Pull, and Push actions.

Sync actions
Sync actions

Importing Git local and remote repositories explicitly

It is also possible to add repositories directly, without going through Metacello. Currently we can do so in two ways: clone directly from a remote like GitHub or by adding a local repository.

Import Repository
Import Repository

When cloning, we need to fill in the git URL.

Clone from Github
Clone from Github

Authentication will happen via SSH and the repository will be cloned in the same place as with Metacello.

Clone from Github
Clone from Github

For local repositories we need to select the folder that contains the repository.

Import from local folder
Import from local folder

Importing a repository does not load the code in the image. Loading a package requires an explicit action.

Load packages
Load packages

Obviously, this is a work in progress and we will add more features but we would love to get feedback. What features are you missing the most?

Chat with us: https://gtoolkit.com/contact/