Set Up Guide

GitHub Integration

What is GitHub & Why Connect GitHub to Fine?

GitHub is a cloud-based platform for storing and collaborating on code, used by developers across the world. To understand how it works and why, first we need to understand Git.

What is Git?

Git is a system for Version Control, that helps people track changes in files, like a history log for code, so they can collaborate without losing past versions. It allows multiple people to work on a project at the same time and merge their changes without conflicts.

GitHub brings this system online - storing your code and files in the cloud and offering a web interface.

Key Features and Terms in GitHub and Git

Repositories (Repos)

  • Repositories (Repos) are storage spaces for code projects. They can be public or private.
  • Each Project in Fine is connected to a Repo in GitHub, and larger projects built by developers will usually have multiple Repos (such as one for Frontend and one for Backend).
  • When you start building a new app in Fine with no Project selected, a new project is created and stored as a draft in Fine. Clicking Save and Push will turn it into a new GitHub Repo.

Branches

  • A branch is a separate version of a repository, which is created to allow you to make changes without affecting the original code.
  • Each new conversation with Fine’s Agent creates a new branch.
  • You can have multiple branches open and GitHub tracks the differences between them all, to ensure that when you combine them back to the main branch, it can be done without any conflicts.
  • To merge the new changes made in a branch to the main branch of your code, you’ll need to create a Pull Request (PR). In organizations, when a developer works on code and wants their changes to be accepted, their PR is usually Reviewed and Merged by a more senior developer, ensuring that the changes made don’t introduce problems.
  • In this respect, treat Fine as your Junior Developer - when the Agent has written or changed code, it can’t push it directly to production. Instead, it can create a PR, which you’ll then need to approve in GitHub.
  • You can create a branch of a branch and so forth, which makes your code start looking like a big family tree - but we’ll get into that later.

Commits

  • Saving your work in Git is called Committing. The more you commit, the easier it is to go back to a specific earlier version of your code.
  • Fine’s AI Agents commit automatically with every change they make.
  • When you make manual changes to code in Fine, you can commit by clicking Save.

Why Connect GitHub to Fine?

If you’re building a new project from scratch, connecting GitHub to Fine means that:

  • Your code is backed up and safe
  • You’ll be able to easily deploy your code (make your website or app go live)
  • You can easily go back to previous versions and undo changes (whether you or the agent made them)
  • You can add your own photos, videos, icons and other files to your app, by uploading them to GitHub.
  • You can give the Agent multiple tasks at the same time (it creates a new branch for each one).
  • You can work on your updates without making the changes go live until you’re ready.
  • There’s no need to copy and paste code into Fine - the Agent searches your repository for what it needs.

Installing the GitHub Integration

The Fine GitHub application connects your GitHub repositories with Fine, allowing our AI agents to analyze your codebase, resolve tickets, and generate new pull requests.

Prerequisites

To install the GitHub integration with Fine, you'll need administrator access to your GitHub organization or account.

Each Fine workspace can be connected to one GitHub organization only. To use Fine with more than one GitHub organization, you’ll need to create a new Fine account, with a different email address, and follow the instructions below to connect your GitHub organization to the new account.

Step-by-step Installation Guide

  • Log in to your Fine account.
  • Click Integrations in the left-hand menu.
  • Click on the "Connect" button in the "Connect Fine with GitHub" section.
  • You’ll be redirected to GitHub, where you need to enter your account details and Authorize Fine:
    • Log in with your GitHub username and password
    • If you have multiple organizations in one account
    • Click on “Authorize”
    • You’ll be asked to select the repositories that you’re giving Fine access to. We recommend clicking “All Repositories” so that you can index any repository you like at a later time, without needing to make updates.
  • You’ll be redirected back to Fine.

Index a GitHub Repository in Fine

  • Click on “Projects” in the left hand menu, followed by “Import from GitHub”.
  • Your GitHub repositories will appear - select the one you wish to index
  • The larger the repository, the longer the indexing will take - but don’t worry, you can navigate away from the page.

Push a Fine Project to GitHub

  • Navigate to “Projects” in the left hand menu and scroll down to “Draft Projects”
  • Here you’ll find all the code written by the agent from scratch, when no Project was selected
  • Click the Cloud/Arrow Icon in the bottom right corner
  • Add a name for your Project. This can include letters and numbers but no spaces.
  • Click Save.

More ways in which Fine and GitHub work together:

Use Fine’s Agents inside GitHub PR to summarise and make revisions to PRs
Use Fine’s Agents inside GitHub Issues to get information, guidance or start coding

Previous
Setup Fine