How to Use Iceberg

Rakshit
4 min readMar 29, 2021

Download Pharo if you haven’t already. You can download Pharo from here.

Iceberg is a really easy-to-use and powerful tool to handle Version Control System in Pharo. There is no need to use a terminal at all when you are using Iceberg.

But if you are someone who is accustomed to using Terminal, it might take some time before you get a hang of how Iceberg works.
So, in this post, I go through how you can perform some basic git operations using Iceberg.

Please see this nice Iceberg tutorial on how to clone a repository, commit changes, push changes, and add packages using Iceberg.

How to create a new branch in Iceberg?

  1. Right-click on the repository name to which you want to add the new branch.
  2. Click on “Checkout branch”

3. Select New branch and then type the new branch name and click on Ok.

How to checkout to an existing branch?

You might have figured this out on your own by now :)

Instead of selecting New branch on the left in the steps mentioned above,
click on “Local”. Then select the Local branch to which you want to checkout and click on Ok.

Click on Checkout on the next window that appears.

Now, you have successfully checked out to a different branch.

How to add a remote repository?

Let’s say you have the forked repository of Pharo in Iceberg. Now, you want to add the Pharo master repository as a remote repository.

  1. Right-click on the repository and then click on Open Repository.

2. Click on the green Add remote button at the top right corner.

Give the remote name and remote URL in the window that appears.
If you are adding the Pharo repository as remote URL, you would have to give this URL— https://github.com/pharo-project/pharo.
Then click on Ok.

You have now successfully created a new remote repository in Iceberg.

How to merge commits from another branch?

Let’s say you want to merge the commits of the master branch to your local development branch.

Make sure that you have checked out to the local development branch.

Right-click on the repository name and click on Open repository as mentioned before.

Select the branch, to which you want to merge commits, on the left.
Then click on the blue merge button at the top left corner.

Select the branch whose commits you are merging in the window that appears.
If you are merging commits from the master Pharo repo, you should add Pharo repo as a remote as mentioned above and then select the branch name and click on Ok.

Note that Pharo9.0 is the latest development branch and Pharo8.0 is the stable branch.

Click on Merge on the next window that appears.

You have now merged all the commits from Pharo branch to your local branch.
You can now push all these commits to your fork by clicking on Push.

Click on Push on the next window that appears.

You have finally merged and pushed all the commits of the Pharo branch to your fork.

This might be a good time for you to read why you don’t need to sync your fork with the Pharo repo.

I hope this article helps you find your way through Iceberg. If you still have doubts, you can always ask them in the #iceberg channel in the Pharo discord community

References

  1. Contributing to Pharo — https://github.com/pharo-project/pharo/wiki/Contribute-a-fix-to-Pharo#why-you-do-not-need-to-resync-your-fork-with-the-pharo-repo
  2. Iceberg Getting Started Tutorial — https://github.com/pharo-vcs/iceberg/wiki/Tutorial

--

--