Installing Git

Create a GitHub account

Cloning (checking out) GATE source code repository

GATE project on GitHub is the public repository of the GATE software.

If you want to get a copy of the GATE source code repository, the command you need is git clone.


$ git clone

This command creates a directory named Gate, initializes a .git directory inside it, pulls down all the data for that repository, and checks out a working copy of the latest version. If you go into the new Gate directory, you’ll see the project files in there, ready to be worked on or used. If you want to clone the repository into a directory named something other than grit, you can specify that as the next command-line option:

$ git clone myrepository

That command does the same thing as the previous one, but the target directory is called myrepository.

Note that the stable version of the GATE source code is branch 'master' (or tag 8.0) and the current development version is branch 'develop' (default branch).

Fork GATE repository

A fork is a copy of a repository

  • It lets any GitHub user make changes to a project without affecting the original repository
  • It can be used to fetch updates from or propose changes to the original repository

Rather than logging an issue for a bug you can:

  • Fork Gate repository
  • Make the fix
  • Submit a pull request to the OpenGATE collaborators so that they pull your work into the original Gate repository

Forking Gate repository is a two-step process:

  1. On GitHub, navigate to the OpenGATE/Gate repository

Now you have a fork of the original OpenGATE/Gate repository

Keep your fork synced

Step 1: Set Up Git

  1. Open Terminal
  2. Tell Git your name so your commits will be properly labeled
    $ git config --global "YOUR NAME"
  3. Tell Git the email address that will be associated with your Git commits.
    The email you specify should be the same one found in your email settings.
    $ git config --global "YOUR EMAIL ADDRESS"

Step 2: Create a local clone of your fork

  1. On GitHub, navigate to your fork of the OpenGATE/Gate repository
  2. Under your repository name, click Clone or download
  4. Open Terminal, type $ git clone, and then paste the URL you copied in 3
    $ git clone
    Cloning into 'Gate'...
    remote: Counting objects: 20182, done.
    remote: Total 20182 (delta 0), reused 0 (delta 0), pack-reused 20182
    Receiving objects: 100% (20182/20182), 13.83 MiB | 3.24 MiB/s, done.
    Resolving deltas: 100% (13674/13674), done.

Now you have a local copy of your fork of the Gate repository

Step 3: Configure Git to sync your fork with the original Gate repository

  1. Change directories to the location of the fork you cloned in Step 2 and type git remote -v
    $ git remote -v
    origin (fetch)
    origin (push)
  2. Type git remote add upstream, and then paste the URL of the OpenGATE/Gate repository
    $ git remote add upstream
  3. To verify the new upstream repository you've specified for your fork, type git remote -v again
    $ git remote -v
    origin (fetch)
    origin (push)
    upstream (fetch)
    upstream (push)

Now, you can sync your fork with the upstream repository

  1. Fetch the branches and their respective commits from the upstream repository
    $ git fetch upstream
    remote: Counting objects : 75, done.
    * [new branch] develop -> upstream/develop
  2. Check out your fork's local develop branch
    $ git checkout develop
    Switched to branch‘ develop'
  3. Merge the changes from upstream/develop into your local develop branch
    $ git merge upstream/develop
    Updating a422352..5fdff0f
    delete mode 100644 README
    create mode 100644

Submit changes with pull requests

To contribute back to the original Gate repository, we recommend creating branches locally, on your computer

  1. Create a new branch within your repository
    $ git checkout –b branch mynewbranch
    Switched to a new branch “mynewbranch"
  2. Create or edit a file in your repository
  3. Push your changes on GitHub
    $ git push origin mynewbranch
    Username for '': yourusername
    Password for '':
    Counting objects: 3, done.
    Writing objects: 100% (3/3), 216 bytes | 0 bytes/s, done.
    * [new branch] mynewbranch -> mynewbranch
    Branch mynewbranch set up to track remote branch mynewbranch from origin.

Create a pull request so that OpenGATE collaborators can review the changes in your branch

  1. Navigate to the OpenGATE/Gate repository
  2. To the right of the branch picker, click New pull request
  3. On the Compare changes page, click compare across forks
  4. Select OpenGATE/Gate as the base fork. Use the base branch drop-down menu to select the branch you'd like to merge changes into
  6. Type a title and description for your pull request
  7. Click Create pull request

After your pull request has been reviewed, your proposed changes can be merged into the OpenGATE/Gate repository.