Working with GitHub and ActiveState

By linking together GitHub and ActiveState, you can streamline your development and decrease the time needed to start working on your project, share your project and repo with others, or onboard new team members/employees.

To do so you will need:

  1. An ActiveState project
  2. An active Github account with a repository (repo) or branch you want to link to your project.

How do I do it?

Connecting your ActiveState project and your Github repo can be done at any time in your project’s development using the following methods:

  1. Adding the link to your Github repo into your project settings.
  2. Importing your project’s activestate.yaml file into your Github repo.

If you intend on sharing your ActiveState project with others, make sure that the project is set to Public and not Private, or that those you want to share it with are already a part of your organization.

  1. Find the URL of the GitHub repo you want to connect to your ActiveState project.
  2. Log in to your ActiveState Platform account.
  3. Go to the Project Settings tab of your project.
  4. In the “GitHub Repo URL” field paste the link to your repo.

alt_text

  1. Click Save Changes.

Now anyone who activates that project on their machine using the state activate <orgname>/<username> command will also pull down that git repo into their project folder. One command will fetch both your repo and runtime.

Your GitHub repo will only be pulled down to your project folder on the initial activation of your project. To update your project use the state pull command, and to update your repo use the git pull command. Git commands will work in your activated state even if there is no Git client on your local machine, as your project will have a Git client included.

Adding your activestate.yaml file to your GutHub repo

  1. Open your local ActiveState project folder to find the activestate.yaml file.
  2. Go to the Git repo you want to connect to your ActiveState project and import the activestate.yaml from your project folder into the repo.

alt_text

And you’re done. Now anyone who clones that repo can activate the runtime by opening a command terminal, going to the cloned working directory, and entering state activate to activate the runtime.

To update your project use the state pull command and to update your repo use the git pull command in your command terminal. Git commands will work in your activated state even if there is no Git client on your local machine, as your project will have a Git client included. Now other members of your team only need to clone the repo to begin working with the ActiveState project directly.


Where do I go from here?

After linking your ActiveState project to an existing Github repo you can integrate your IDE with your ActiveState runtime.