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.
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
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
To compare and find the diffs, we need some branches setup to track specific remotes.
git checkout -b upstream upstream/master
git checkout master
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
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.