We use GitHub's normal fork-and-pull collaboration model, which usually works like this:
-
Fork the main Scala School 2 repository from the Twitter account to your personal account.
-
Clone your fork from GitHub to your local development machine:
git clone [email protected]:<username>/scala_school2.git
-
Your local repository will have
origin
bound to your remote repository on GitHub, where it was cloned from. You'll also want to be able to pull directly from the upstream Twitter repository, so:git remote add upstream [email protected]:twitter/scala_school2.git
-
Pull the latest changes from
upstream/master
(Twitter's repo) into your localmaster
branch:git checkout master git pull upstream master
-
Do your work on a feature branch:
git checkout -b <branchname> ... git commit
-
Push the new branch to
origin
(your personal GitHub remote):git push -u origin <branchname>
-
The new branch will then appear in your GitHub repository, along with a helpful suggestion to "compare & pull request." Do it! It should probably reference an issue number in our issue tracker, like:
fix #123: teach all the scalas
.
Since the server doesn't automatically pick up code or resource changes on the fly when using sbt run
, it's typically handiest to use the sbt-revolver plugin instead; this is already configured in the project. From within the sbt
console, invoke:
~re-start
This will kick the server every time you save a change to disk, which should take just a couple seconds. Leave the console running in the background while you work, and if you notice that changes you're making aren't showing up, check the console for compile errors.