Jumpstarting a new organization on Github

Well this is always a little complicated, but some notes on doing this:

  1. If you are non-profit, Github actually provides you with a free organizational membership. You just send them an email and then a copy of your IRS tax status and you get upgraded.
  2. When you create your first repos, you will find that by default you cannot fork private repos. You have to change the settings by going to the organization and looking through settings. I’m guessing this is a security issue because you could fork a private repo and then make the fork public which would be very bad.
  3. So why fork a private repo so you can create a submodule. The main reason is if you are a consultant or have multiple organziations that you work with. If you have a single master repo for your personal use, you can make each one an external submodule. Makes it very convenient to keep everything in one place and you can reproducibly build your development environment too.
  4. Use submodules. There are two steps here, create an extern in your master development repo and then there do a git submodule add git@github.com:yourpersonalrepo/thatrepo
  5. Now create an upstream branch so you can make changes locally, to your private copy and then push changes as needed to the master. This models the way you commit to really external things internally. So this looks like moving into the newsubrepo directory and running git remote add git@github.com:upstreamorg/thatrepo

Now the workflow is pretty standard:

  1. Hack away at your personal branch with git checkout -b rich-newstuff and then you continuously update your private branch and then the master branch.
  2. When you are ready to push this into the organization, you rebase everything and the do a git push upstream yourbranch:master and this will make the changes upstream. Actually, you will normally do a pull request, but you get the idea. You have two layers of isolation. Your dev brancy, your private master and then what is upstream.

I’m Rich & Co.

Welcome to Tongfamily, our cozy corner of the internet dedicated to all things technology and interesting. Here, we invite you to join us on a journey of tips, tricks, and traps. Let’s get geeky!

Let’s connect