In this video, I'll introduce Git and GitHub. You'll see how to install Git if you haven't already and clone or fork the Meteor project. Then I'll show you two different ways to run different versions of Meteor.
Git is a source code version control system. Git has become really popular in the past couple of years, especially in open source because it's easy to use and it's great for individual and team use. If you're using a Mac or a Unix operating system, chances are you already have Git installed. You can check by typing Git with the version flag in a terminal window. If it's not installed, you can use your favorite install package manager or download and install it from the official download site.
GitHub is a very popular site for sharing public and private Git projects. It's the server where the Meteor source code lives. Creating an account on GitHub is easy and will let you start creating and contributing to projects. You can also log in to Evented Mind using your GitHub credentials with our single signon OAuth integration.
Now let's clone the Meteor project into a local folder. This way we can explore the Meteor source code and follow along with Meteor development. To do that, I'll use the Git Clone command along with the address of the media repository. I'll go ahead and clone the project into my code folder.
I typically keep my project in the source, or SRC for short, directory of my home folder. We can check out other branches using the Git Checkout command. You can think of branches as temporary areas where features get worked on. Most development on Meteor happens in the devel branch. But sometimes you'll see feature branches, like the recent shark branch where much of the Meteor UI work was done. Development typically flows from these feature branches into devel and finally into master where they get ready for release.
Let's look at two ways to run our Meteor applications from different Meteor versions. When we use the Meteor command to run our application, we're running it with the version of Meteor used when we created our app. We can update the project to the latest version of Meteor by using the Meteor Update command.
We can also run the project with a specific release of Meteor using the dash dash release option with the Update command. This is often useful if you want to try out a new release candidate, or if you want to go back to a previous version of Meteor.
But sometimes we want to run a version of Meteor that hasn't been released at all. In these cases, we can run our apps directly from a Git Checkout of Meteor. For example, let's say we want to follow along with the shark branch. I'll navigate into Meteor and Git Checkout that particular branch.
Then from my project, I'll run my app using the full path to my Git Checkout of Meteor. Since typing this full path every time can be cumbersome, I've created a shortcut in my batch RC file called Dev Meteor. This lets me just type Dev Meteor to run a project with a Git Checkout of Meteor.
In this video, we explored how version control works with the Meteor project using Git and GitHub. Then we looked at two ways to run a specific version of Meteor. The first is to use the release flag. The second is to run our application from a Git Checkout of Meteor.