Set up GitHub for AI-assisted development

Learn how to set up GitHub for Claude Code, Cursor (now Grok Build) and Codex. Create a repository, understand version control and prepare your app for AI-assisted development.

Last updated

This guide shows you how to prepare and hand off your Zalcro implementation plan to your chosen AI coding tool. The actual implementation is performed by that tool. Zalcro does not control or guarantee the code generated, its functionality, security or deployment outcome.

Before you start building an application with AI coding agents such as Claude Code, Cursor (now Grok Build) or Codex, it helps to establish where your application's source code will live and how changes to that code will be managed.

GitHub provides a central repository for your application's source code and its version history. This guide explains how to set up GitHub, prepare a repository and make it available to your chosen AI coding agent.

You do not need programming or command-line experience to follow this guide.

Last checked

We checked the GitHub, GitHub Desktop, Claude Code, Cursor and Codex details in this guide against their official documentation on 2 December 2026. Third-party screens, setup flows and plan requirements may have changed since.

Why do you need GitHub when building with AI?

AI coding agents can create files, modify existing code, install dependencies and implement application functionality.

As your application grows, different coding sessions may introduce hundreds or thousands of changes across its source code. Without version control, it can become difficult to determine:

  • What changed in your application.
  • When a change was introduced.
  • Which changes belong to a particular implementation task.
  • How to recover an earlier version.
  • Whether multiple coding agents are working from the same version of the code.

GitHub, together with Git, helps you manage these changes.

A GitHub account is not mandatory for every local AI coding workflow, but version control is strongly recommended when building an application through multiple implementation phases and coding sessions. It is especially valuable when AI agents make code changes that you may not fully understand yourself.

Version control helps you track and review changes, though it does not guarantee that generated code is correct or safe.

How GitHub fits into your AI development workflow

Zalcro, GitHub, AI coding agents and hosting providers serve different purposes in an agentic coding workflow.

Tool Purpose
Zalcro Defines your application requirements, software architecture and structured implementation instructions.
GitHub Stores and manages your application's source code and version history.
Claude Code, Cursor or Codex Implements development tasks by creating and modifying code.
Hosting provider Runs or serves your application so that its intended users can access it.

Your Zalcro blueprint explains what should be built and how it should be designed. Your GitHub repository provides a shared source of code for the coding agents responsible for implementing that plan. Your hosting environment provides the infrastructure required to run or distribute the resulting application.

These are separate parts of the development workflow.

Zalcro plans the work; your coding agent works with the repository; hosting comes later
  • Zalcro (planning layer): Produces your requirements, architecture and implementation instructions. Zalcro does not write code directly into GitHub or deploy your application.
  • AI coding agent: Receives your implementation instructions and creates or edits source code files in your repository.
  • GitHub repository: Holds the source code and version history shared across coding sessions.
  • Hosting environment: Runs or serves your application once deployment is configured. Hosting is a separate downstream activity outside the scope of this guide.

This guide focuses on preparing GitHub before implementation begins. For background on how structured specs and coding agents work together, see Spec-Driven Development: A Start-to-Ship AI App Workflow.

Before you begin

You will need:

  • An internet connection.
  • An email address for creating a GitHub account.
  • A computer if you intend to work with a locally installed coding agent.
  • A Zalcro application blueprint, if you are following the Zalcro implementation workflow.

You do not need an existing application or source code repository.

If you have not planned your application yet, start with Generate your app blueprint and Understand your app blueprint. You can also browse Zalcro Samples to inspect example architectures and implementation plans without creating a project first.

GitHub terminology for beginners

Before creating your repository, review a few essential version control concepts.

What is source code?

Source code is the collection of files and instructions that define how an application works. These files may include application logic, user interfaces, configuration, data structures and instructions for running the application. AI coding agents create and modify these files during development.

What is Git?

Git is a version control system that records changes to files over time. It allows you to maintain a history of your application's development, compare changes and work with different versions of your code.

Git operates independently of GitHub. You can use Git locally on your computer without a GitHub account.

What is GitHub?

GitHub is an online platform for storing and collaborating on Git repositories. It provides a central location where developers and authorized coding agents can access a project's source code and version history. GitHub also provides tools for reviewing changes, managing permissions and coordinating development work.

What is a repository?

A repository, often shortened to repo, is a collection of project files managed through version control. Your repository may eventually contain:

  • Application source code.
  • Configuration files.
  • Dependency definitions.
  • Documentation.
  • Automated tests.
  • Database migration files.
  • Deployment configuration.

A repository can contain only a few files when you first create it. Your coding agents will add the required application files during implementation.

What is a commit?

A commit is a recorded set of changes to a repository. Each commit has an identifier, an author and a message describing the changes. Commits create a development history that helps you understand how your application evolved.

For example, after an implementation ticket has been completed and reviewed, its changes can be recorded in a commit associated with that task.

What is a branch?

A branch is a separate line of development within a repository. The default branch is commonly named main.

Additional branches allow developers and coding agents to work on changes separately before those changes are incorporated into the main version of the application. Branches are particularly useful when multiple agents work on different implementation tickets. See GitHub's documentation on branches.

What is a pull request?

A pull request is a proposal to incorporate changes from one branch into another. It provides an opportunity to review the proposed changes before merging them into the main branch. See GitHub's documentation on pull requests.

A pull request does not establish that the proposed changes are correct or safe. The changes still need to be evaluated before you merge them.

What are clone, push and pull?

These terms describe common operations used to work with Git repositories.

Term Meaning
Clone Create a working copy of a remote repository on your computer.
Commit Record a set of changes in the repository's history.
Push Send committed changes to the remote repository.
Pull Retrieve and integrate changes from a remote repository.
Merge Combine changes from different branches.

You do not need to memorize Git commands to begin. Graphical tools such as GitHub Desktop allow you to perform common operations without using a terminal. For a short walkthrough of repositories, branches and pull requests, see GitHub's Hello World guide.

Step 1: Create a GitHub account

  1. Visit GitHub and select the option to sign up for an account.

  2. Follow the registration prompts and verify your email address.

    If you already have a GitHub account, sign in and continue to the next step.

Secure your GitHub account

Your GitHub account may eventually provide access to your application's entire source code.

  • Enable two-factor authentication (2FA) or another supported strong authentication method. Follow GitHub's guide to configuring two-factor authentication.
  • Use a unique password and store your recovery codes in a secure location.

Never share your GitHub password with an AI coding agent

Do not give your GitHub password or recovery codes to an AI coding agent or paste them into a prompt. Coding tools should access GitHub only through their supported authentication and authorization mechanisms.

Step 2: Create a repository for your application

Once you are signed in to GitHub, create a repository to hold your project. See GitHub's quickstart for repositories for current interface details.

  1. On GitHub, select the option to create a new repository.

  2. Choose the personal account or organization that will own the repository.

  3. Enter a short, descriptive repository name.

  4. Optionally, add a brief description of your application.

  5. Select the repository visibility (Public or Private).

  6. Enable the option to add a README file.

  7. Select Create repository.

    GitHub opens the new repository's main page with its initial commit.

Choose a repository name

Choose a short, descriptive name for your application. Repository names commonly use lowercase letters and hyphens instead of spaces. For example:

  • my-app
  • project-dashboard
  • workout-tracker

You can rename a repository later, though doing so may require updating connected tools or remote references.

Public vs. private repositories

GitHub supports both public and private repositories. See GitHub's overview of about repositories and visibility for details on access controls.

Repository visibility Who can access it?
Public Anyone on the internet can view the repository's source code.
Private Access is restricted to authorized users and approved integrations.

If you are building a commercial application, an unpublished product or a personal project that should not be publicly accessible, start with a Private repository. You can reconsider its visibility later.

Private repositories are not a secret store

A private repository is not a substitute for secure credential management. Never commit API keys, database passwords or private tokens to source control, regardless of whether the repository is public or private.

Should you add a README file?

A README is a document that introduces your repository. For a new application, it can start with only the project name and a short description.

Adding a README is a recommended starting point rather than a universal requirement. Enabling it creates an initial commit and initializes your default branch so you can clone the repository right away. Your coding agent can expand the README during implementation.

Should you add a license or .gitignore file?

A license defines the terms under which other people may use, modify or distribute your source code. Selecting a license is not mandatory. Do not select an open-source license without understanding its implications, especially if you plan to build a proprietary application.

A .gitignore file identifies files and directories that Git should not normally track, such as local configuration files, dependency directories and generated build output. See GitHub's guide on ignoring files.

If you already know which .gitignore template matches your blueprint's technology stack, you can select it during repository creation. Otherwise, your coding agent can create an appropriate .gitignore file during project scaffolding. Sensitive files must be excluded before they are added to version control.

Step 3: Confirm your repository has been created

After creating your repository, GitHub displays the repository's main page. Confirm that you can identify:

  • The repository name and owner.
  • Its visibility (Public or Private).
  • Its default branch (typically main).
  • The README file, if you selected that option.
  • Its initial commit history.
  • The repository URL in your browser address bar.

At this stage, your repository contains no application code. That is expected.

Your Zalcro implementation plan and tickets will guide the work required to establish the application scaffold and create the remaining files. Do not manually install frameworks or introduce application components unless your blueprint or preparation instructions call for them.

Step 4: Prepare your development environment

AI coding agents operate in different environments. Some work directly with files on your computer, while others run in remote or cloud-based environments connected to GitHub.

Development approach Preparation required
Local coding agent Clone the repository to your computer and open its project folder.
Cloud-based coding agent Authorize the coding service to access your GitHub repository and complete its environment setup.

Choose the workflow supported by your preferred coding agent.

Step 5: Clone your repository using GitHub Desktop

Follow this step if your coding agent will work with files on your computer. If you plan to use only a cloud-based coding agent, continue to Step 6.

Cloning creates a local working copy of your GitHub repository on your computer so locally running coding agents can access and modify its files.

GitHub Desktop is a graphical application for managing Git repositories without requiring command-line experience.

Install GitHub Desktop

  1. Visit GitHub Desktop and download the installer for your operating system.

  2. Install the application following the GitHub Desktop installation guide.

  3. Open GitHub Desktop and sign in with your GitHub account.

    Once signed in, confirm your pre-filled Git name and email if prompted, and GitHub Desktop displays your repositories.

Operating system support

GitHub Desktop is officially supported on Windows and macOS. If you use Linux, follow GitHub's official guide to setting up Git or use another supported Git client. See the GitHub Desktop documentation for full requirements.

Clone your repository

  1. In GitHub Desktop, select Clone a repository from the Internet (or open File > Clone Repository).

  2. Select the repository you created in Step 2 from your account's repository list.

  3. Choose the Local path on your computer where the project folder should be stored.

  4. Select Clone.

    GitHub Desktop downloads a working copy of the repository to the folder you chose.

For current screenshots and troubleshooting steps, see GitHub's guide to cloning a repository from GitHub to GitHub Desktop.

Your repository now exists in two locations:

  • A remote repository on GitHub.
  • A local working copy on your computer.

Changes made locally do not appear on GitHub automatically. Git operations (commit and push) are used to synchronize your local copy with the remote repository.

Identify your project folder

Locate the folder created by GitHub Desktop at the Local path you selected. This is the project folder you will open in your locally installed coding agent.

Avoid moving or duplicating the folder unnecessarily. Creating extra copies can make it hard to tell which folder holds your latest changes.

Step 6: Make your repository available to your AI coding agent

Each coding agent connects to your repository differently. Follow the section for the tool you plan to use.

Using GitHub with Claude Code

Claude Code can work with an application's files in a local development environment and also supports remote development options.

For a local Claude Code workflow:

  1. Install and authenticate Claude Code using the official Claude Code documentation.

  2. Clone your GitHub repository to your computer (Step 5).

  3. Open a terminal in your repository's project folder.

  4. Start Claude Code from inside that folder:

    Start Claude Code in your repository folder
    claude

    Claude Code opens inside your project folder and can read and modify files within its configured working environment and permission boundaries.

If you use a remote or cloud-based Claude Code workflow, follow the GitHub authorization and repository connection steps in the official Claude Code documentation instead.

For more on preparing your architecture before coding with Claude Code, read how to plan an app before building with Claude Code.

Using GitHub with Cursor

Cursor is an AI-powered code editor that provides local coding agent capabilities and cloud-based agent workflows.

For a local Cursor workflow:

  1. Install Cursor and sign in to your account.

  2. Clone your GitHub repository to your computer (Step 5).

  3. Open Cursor and select Open folder.

  4. Choose your repository's project folder.

  5. Confirm that the repository's files (such as your README) appear in the editor's file explorer.

Open the repository folder itself rather than a parent folder containing multiple unrelated projects. That keeps Cursor focused on the Git repository for your application.

If you choose a cloud-based Cursor agent workflow, authorize GitHub access and configure your repository environment according to the official Grok Build documentation. For planning context before coding, see how to plan a project before coding with Cursor.

Using GitHub with Codex

Codex supports both local and cloud-based coding workflows.

For a local Codex workflow:

  1. Install or open your supported local Codex client (CLI or IDE extension) and sign in.

  2. Clone your GitHub repository to your computer (Step 5).

  3. Open or navigate to your repository's project folder in Codex.

  4. Confirm that Codex is working inside the intended project directory.

For a cloud-based Codex workflow:

  1. Open the supported Codex cloud environment.

  2. Connect your GitHub account.

  3. Authorize access to your application's repository.

  4. Select the repository and complete any required environment configuration.

Cloud agents work from the remote repository

A cloud-based coding agent reads from your remote repository on GitHub, not from uncommitted files on your computer. Confirm that your remote repository contains the code version you expect the agent to start from.

See the official Codex documentation for current installation, GitHub authorization and environment setup instructions.

Grant only the necessary repository permissions

When connecting a coding service to GitHub, you may be asked to authorize repository access.

Follow least-privilege repository access

Where supported, grant access only to the specific repository your coding agent needs rather than every repository in your GitHub account. Review requested permissions before approving them, and do not provide account passwords, unrestricted access tokens or unrelated credentials because a coding agent asks for them.

Step 7: Understand how changes will be managed

You have now prepared the repository where your application's code will live. Before handing off implementation tickets, understand how changes are recorded and synchronized.

Local changes and commits

When a locally running coding agent modifies project files, those edits exist only on your computer until you record and upload them.

GitHub Desktop (or another Git client) shows which files changed and lets you inspect line-by-line differences. Once you have reviewed the work, you commit the changes to your local version history and push the commit to GitHub. See GitHub's guide to committing and reviewing changes in GitHub Desktop.

Commit saves changes locally; Push sends them to GitHub; Pull retrieves remote updates
  • Clone: Copies the remote GitHub repository to your computer.
  • Modify and review: Your coding agent updates files in your local working copy, and you review the changes.
  • Commit: Records the reviewed changes in your local version history.
  • Push: Uploads your committed changes to the remote repository on GitHub.
  • Pull: Retrieves new commits from the remote repository into your local working copy so your computer stays synchronized.

Some coding agents can run Git commands such as commit and push on your behalf. Even when an agent performs those steps, review what is being recorded and uploaded. Zalcro does not control Git operations performed by coding agents.

Cloud-based changes

A cloud-based coding agent typically works on an isolated copy or separate branch of your repository. Depending on the platform, it may propose changes through a pull request or another review mechanism.

Check how your chosen platform handles branches and pull requests before assuming that changes have been merged into your main branch.

Use meaningful commit messages

A commit message should describe the purpose of the recorded changes. When implementing work from Zalcro coding tickets, referencing the phase and ticket makes your history easier to trace:

Example commit message referencing a Zalcro ticket
Phase 1, Ticket 1: Initialize application scaffold

Meaningful commit messages help you match code changes back to specific implementation tasks. Avoid bundling unrelated changes into one commit solely because they were made during the same coding session.

Working with GitHub and multiple AI coding agents

Keeping your code in a GitHub repository allows different coding sessions or tools to work from a shared codebase. Giving multiple agents access to the same repository does not coordinate their work automatically, though. You still need to manage dependencies, code versions and task scope.

Sequential implementation

When one implementation ticket depends on another, the prerequisite code must be available to the agent working on the dependent ticket. For example:

  • Ticket 1 creates a shared application component.
  • Ticket 2 uses that component to implement another feature.

The agent implementing Ticket 2 should start from a code version that already contains the reviewed and accepted changes from Ticket 1. Marking Ticket 1 complete in a task tracker does not make its code available to another agent on its own.

Dependent tickets require prerequisite changes to be reviewed and present in the branch first
  1. Ticket 1 is handed to Agent A with its implementation instructions.
  2. Review and incorporate: You review Agent A's changes and commit, push or merge the accepted work into the appropriate branch.
  3. Sync: Agent B accesses the updated code from that branch.
  4. Ticket 2 instructions are handed off to build on the accepted prerequisite work.

This sequence describes the expected workflow rather than a guaranteed outcome. Every ticket's output still requires verification before dependent work begins.

Independent implementation tasks

Some implementation tickets have no direct dependencies on one another. Separate branches or isolated working environments can allow agents to work on those tasks concurrently.

However, separate branches do not eliminate conflicts. Even tickets without declared dependencies may edit overlapping files or shared configuration. Parallel work requires coordination and review before branches are merged.

If you are new to version control, completing one ticket at a time is a practical starting approach. The Understand phases, implementation tickets and dependencies guide covers sequencing and agent assignment in more detail.

GitHub is not your implementation plan

GitHub stores source code and records change history. It does not preserve the reasoning behind your architecture or decide the correct build sequence on its own.

Your Zalcro blueprint provides that planning context through:

Giving coding agents both a prepared repository and structured implementation instructions helps them understand what to build and what to leave unchanged. For more on ticket structure, read The Art of Writing Tickets for AI Coding Agents.

Protecting sensitive information in your repository

Applications often require sensitive configuration values, including:

  • API keys.
  • Database passwords.
  • Payment service credentials.
  • Authentication secrets.
  • Access tokens.
  • Private encryption keys.

Keep secrets out of Git and GitHub

Never commit credentials, API keys or private secrets to your repository, whether the repository is public or private. Neither GitHub nor private repository visibility guarantees credential security if secrets are committed to source code.

Understand environment variables

Environment variables let your application read configuration values at runtime without hardcoding them inside source files.

Your Zalcro architecture and setup guidance identify the environment variables your application needs. Store their values using the secret-management features of your local development setup and hosting provider.

Keep in mind that environment variables exposed to browser-side (frontend) code can be inspected by users and should never hold private server secrets.

Understand .gitignore

A .gitignore file tells Git which untracked files and directories to exclude from version control. During project setup, your coding agent may configure .gitignore to exclude local environment files (such as .env), dependency directories and generated build output while keeping an example file that lists variable names without real secret values.

See GitHub's documentation on ignoring files.

.gitignore does not erase past commits

Adding a file to .gitignore prevents Git from tracking new untracked files. It does not remove sensitive values that were already committed to repository history. If you accidentally expose a credential, revoke or rotate it right away and follow GitHub's guide to removing sensitive data from a repository.

AI coding agents and credentials

Do not assume an AI coding agent will automatically recognize which values must remain private. Avoid pasting live credentials into ordinary coding instructions, and review proposed changes carefully before committing or pushing them, especially changes involving authentication, API integrations, environment variables or deployment configuration.

Is GitHub the same as hosting?

No. GitHub primarily provides source code storage and version control. Application hosting provides the environment where your application runs or is served to users.

Storing application code in a GitHub repository does not automatically make the application live for its users. While services such as GitHub Pages can host static websites, most web, full-stack and mobile applications require dedicated hosting infrastructure, backend services or databases.

Your application's hosting requirements depend on its architecture.

Application type Possible hosting requirements
Static website Static hosting service
Frontend web application Static or managed web hosting
Full-stack web application Hosting for frontend and server-side functionality
Application with persistent data Application hosting and a database service
Native mobile application Mobile build and distribution infrastructure, potentially alongside backend hosting

Your Zalcro Architecture Design Document outlines the recommended deployment approach for your application. Continue to Choose and set up hosting for guidance on preparing the infrastructure your blueprint requires.

Before handing off implementation tickets

Review this checklist before moving on to hosting setup or ticket handoff:

What you've accomplished

You have prepared a GitHub repository for your application and established how your chosen AI coding agent will access its source code. You also understand the version control concepts that help you track, review and synchronize changes across implementation phases.

Your repository is now ready for the development tasks defined in your Zalcro implementation plan. No application code or implementation work is required to complete this guide.

Next steps

Continue to Choose and set up hosting to understand the hosting and backend infrastructure your application may require.

After preparing your development environment, you can continue to the guides covering:

If you want to inspect real blueprints and phased implementation plans before starting, browse Zalcro Samples.

Zalcro provides the planning foundation and structured implementation instructions. Your chosen coding agent performs the actual implementation.