Skip to content

Instantly share code, notes, and snippets.

@Toasterson
Last active September 28, 2022 15:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Toasterson/75a52c1d4b5c500a384277765765af43 to your computer and use it in GitHub Desktop.
Save Toasterson/75a52c1d4b5c500a384277765765af43 to your computer and use it in GitHub Desktop.
illumos gate forking and upstreaming Guide

illumos gate forking and upstreaming Guide

This guide is intended to get people started to Organise and maintain forks of illumos-gate similar to illumos-omnios or illumos-joyent. While the reasons one might want to make a fork might be many or how long that fork should exist, it is not in the scope of this guide to give information on why one should do this. It is assumed this reasoning has already happened and the reader wants to maintain a temporarily or full fork. All steps can be done with the GitHub CLI aswell but since that does not compile on illumos yet, it is left out of this guide.

Starting the fork.

To start the fork with purely git, use github's fork button. Then Clone the new fork. replace my username toasterson with the name or the organisation you shose to house the clone.

  • Fork repo
  • git clone git@github.com:toasterson/illumos-gate.git
  • cd illumos-gate

Setup remotes and tracking branches.

For the future we will now setup remotes so we can use them in future commands to get commits from them directly.

  • Setup upstream
    • git remote add upstream git@github.com:illumos/illumos-gate.git
    • git remote update

Setup tracking branches

To compare and find the diffs, we need some branches setup to track specific remotes.

  • git checkout -b upstream upstream/master
  • git checkout master

Cherry-pick workflow

Now that we have the remotes setup we can start cherry-picking the commits we want. Repeat only this once the local workspace is setup.

  • Check logs and find commits differing
    • git log --oneline upstream
  • Now Cherry pick all commits you want one at the time
    • git cherry-pick $SHA_COMMIT

Push and profit

If doing the push the first time it is better to set the remote branch with -u to not push to the wrong branch

  • git push -u toasterson master

Later a simple git push will be enough. Make sure you are in the right branch you want to land in your fork when doing this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment