Import a GitHub repository & ask about it in the Gemini web app

On a computer, you can attach a GitHub repository to your prompt with the GitHub app, and ask Gemini to:

  • Help you better understand the codebase
  • Answer questions about specific functions
  • Suggest code additions and improvements
  • Debug issues

What you need

  • Be 18 or over.
  • A personal Google Account that you manage on your own. For now, the GitHub app isn’t available while signed in to a work or school Google Account.
  • Be signed in to the Gemini web app on a computer. Learn how to sign in to Gemini Apps.
  • Have Gemini Apps Activity on.

Important:

  • After you upload a GitHub repository, changes to the repository aren’t synced to Gemini. In Gemini Apps, the repository remains in the same state as when it was uploaded.
  • For now, the features below aren’t available on mobile devices, including the Gemini mobile app or Gemini in Messages.

Import & ask about a GitHub repository

Important: You can add only one repository, with up to 5,000 files and a maximum size of 100 MB, to a chat.

  1. On your computer, go to gemini.google.com.
  2. In the text box at the bottom, click Add file  and then Import code .
  3. Enter the GitHub repository or branch URL.
  4. Click Import.
  5. Follow any on-screen instructions to import the repository.
    • To import a private repository, your GitHub account that has access to that repository must be linked to your Google Account. If it isn’t, you’ll get the option to link it.
  6. Enter your question or prompt.
  7. Click Submit .

Tip: After you add a repository to a chat on a computer, you can continue that chat in the Gemini mobile app and Gemini web app on your mobile devices.

Examples

  • What external libraries are used in the attached code?
  • How can the attached code be more efficient?
  • Write event handlers for the attached code to recommend products to users.

Disable the GitHub app

Important: If you disable the GitHub app, it doesn't unlink your GitHub account from your Google Account. Gemini won't use your GitHub account while the connected app is disabled.

The GitHub app is enabled the first time you try to import a GitHub repository. You can enable or disable it at any time on your Apps page in Gemini settings.

  1. On your computer, go to gemini.google.com.
  2. At the bottom, click Settings and then Apps .
  3. Disable the GitHub app .

You can unlink your GitHub account and revoke permissions to repositories through your Apps page in Gemini settings. This unlinks your GitHub account from your Google Account and all Google services.

  1. On your computer, go to gemini.google.com.
  2. At the bottom, click Settings and then Apps .
  3. Under “GitHub,” click Learn more.
  4. Click Disconnect.

Tips:

What Gemini can’t do with the GitHub app

  • Retrieve commit history, pull requests, or other metadata
  • Read a repository by including a GitHub URL directly in your prompt
  • Write to a code repository

How apps work in Gemini

  • Gemini only connects to apps that are on your Apps page in Gemini settings. This includes apps you turn on when you specify them in your prompt with an "@" mention.
  • Gemini checks for apps that can help it generate a more helpful response. If Gemini finds an app that can help, it automatically sends information from your conversation and other relevant information to that app. For example, Gemini will send your location data to Google Maps if you ask for coffee shops near you and the Google Maps app is on in your Apps page in Gemini settings.
  • Gemini won’t access your personal content in other services without your permission. Some apps are designed to automatically work with Gemini apps.
  • If you directly interact with another Google service in Gemini Apps, your activity might be saved by that other service. For example, if you watch a YouTube video in a Gemini app, YouTube may:
  • Gemini Apps can connect with third-party apps and services. When they do, Gemini Apps share information with those apps and services to fulfill your requests. That information is then used by those third-party apps and services according to their own developers' privacy policies.
  • If you disable the YouTube app, you can still talk Live about a video you’re viewing in the YouTube app.

Learn more about how connected apps work with your personal data.

Related resources

Search
Clear search
Close search
Main menu
4354549777908117279
true
Search Help Center
true
true
true
true
true
5295044
false
false
false
false