This GitHub trick lets ChatGPT dissect your code in minutes – here is how

How to move a codebase into GitHub and make it available for ChatGPT Deep Research

A couple of days in the past, I confirmed you a tremendous new ChatGPT function accessible to paying customers. Plus, Professional, and Group tier customers can now level Deep Analysis at a whole GitHub repo and get again evaluation reviews.

Additionally: I take a look at a variety of AI coding instruments, and this gorgeous new OpenAI launch simply saved me days of labor

As I confirmed, this functionality helps velocity up the method of coming up to the mark on present codebases. You may want to do that in case you purchase a product from one other developer or in case you're introduced onto a challenge and must be taught the codebase rapidly. It's additionally good for reviewing your individual codebase and refreshing your self on how sections work — particularly in case you've moved on to different issues for some time and at the moment are coming again to the unique code.

I promised I'd present you the right way to deliver a codebase into GitHub particularly for evaluation by Deep Analysis. That's what we're about to do on this article.

Transferring my code into GitHub

To exhibit this, I'm transferring My Personal Website into GitHub. My Personal Website is a freemium WordPress plugin with about 20,000 lively customers I've been engaged on for a couple of decade. WordPress, for historic causes, makes use of SVN as an alternative of GitHub as a code repository, so I haven't actually had a must put My Personal Website into GitHub.

Additionally: I put GitHub Copilot's AI to the test – its mixed success at coding baffled me

However given the chance to carry out deep evaluation on it, I made a decision to set it up. I'll undergo that course of with you right here.

Getting began with GitHub Desktop

Earlier than we begin, let's make clear some issues. Git is a distributed model management system that runs on a programmer's native laptop. GitHub is a cloud-based service that shops an unlimited library of open-source and proprietary coding tasks. These tasks are moved into GitHub (the cloud service) utilizing Git (the device).

Actual programmers solely use Git on the command line, the place it's often called git. No actual programmer would dare to capitalize git. Actual programmers command git by way of a spread of choices, creating specialised command traces that do their bidding. Failure to make use of git on the command line will lead to your real-programmer card being revoked by the Worldwide Society of Programmers Who Are Smarter Than You.

Additionally: How I used GitHub Spark to build an app with just a one-sentence AI prompt

I’m apparently not an actual programmer. I’d as effectively get that out of the way in which earlier than the feedback erupt in disdainful RPs (actual programmers) mocking my lack of command-line acuity. I don't use Git by way of the command line. I don't prefer it. I imagine people left the cave way back and adopted graphical consumer interfaces as instruments of civilized society.

I, subsequently, choose utilizing GitHub Desktop, which is a point-and-click model of Git for these unfit of the title actual programmer. And sure, my official real-programmer card has been revoked. I can stay with it.

You may obtain GitHub Desktop right here.

When you've launched GitHub Desktop, both sign up to your GitHub account or create one. I've lengthy had a GitHub account for different tasks, so I simply signed in.

Learn how to create a GitHub repository

Subsequent, I created a repository within the GitHub cloud for my codebase. Right here it may be slightly complicated. Regardless that I didn't have an present repo for My Personal Website, I selected "Add an Present Repository out of your Native Drive…" as a result of I used to be going to take that codebase and switch it right into a repo.

GitHub Desktop is definitely fairly sensible about this. As soon as it realizes there's no GitHub information for the folder chosen, it gives you an error and give you the choice to create a repo. Click on the hyperlink highlighted by the inexperienced arrow proven beneath.

That may current the Create a New Repository dialog. Right here, I named my repo (all lowercase, with dashes between phrases), added a brief description, advised it the native path to the code on my laptop, and left the remaining as-is.

I didn't must play with the README, license, or ignore choices as a result of I'm utilizing this repo for AI evaluation, not for supply management and collaboration.

It's right here I ought to notice this text describes what it is advisable do to let your code be examined by ChatGPT Deep Analysis. That is positively not a complete how-to-set-up-GitHub article.

Learn how to transfer the codebase to GitHub

It's time to maneuver your code as much as GitHub.

Right here's a cautionary notice: For those who've stored your code non-public, importing it to GitHub is sending your code to a cloud service. GitHub presents each non-public and public repositories, however you're technically giving Microsoft entry to your code. Microsoft owns GitHub.

Now, go forward and hit Publish.

At this level, you'll have the chance to make your repo public or non-public. Once you join ChatGPT to your repo, you'll be passing alongside your entry rights, so you possibly can let ChatGPT study a personal repository.

Additionally: Learn how to use ChatGPT: A newbie's information to the most well-liked AI chatbot

That mentioned, I bumped into some points with Deep Analysis accessing my code, and one of many issues ChatGPT requested me was whether or not my code was public. My tackle that’s: in case your code is non-public and you’ve got all of your credentials and connector arrange (extra on that later), you possibly can most likely work on a personal repo.

Since My Personal Website is open supply, I unchecked "Maintain this code non-public."

Taking a look at your new repository

If every part labored, you'll see a brand new possibility: "View on GitHub." Click on it.

That may deliver you to your newly created GitHub repo. Right here's mine.

Now that your repo is up, be aware of its designation. You will discover that within the higher left nook of the GitHub display. For My Personal Website, it's davidgewirtz/my-private-site (with none areas).

Learn how to arrange the ChatGPT connection

Now it's time to modify to ChatGPT. The following two screenshots are the identical as what I confirmed you on this article on the function. However to get to the subsequent configuration step, you'll must do what's proven within the screenshots.

First, change your mannequin to o3 and sort within the immediate precisely as I did. You may most likely tweak this over time, however when you have the $20-per-month Plus tier, you're solely going to be allowed 10 queries into Deep Analysis monthly, so slicing and pasting is your good friend.

Subsequent, click on the little caret subsequent to Deep Analysis.

Additionally: Want to try ChatGPT's Deep Research tool for free? Check out the lightweight version

Now, create the hyperlink between your ChatGPT account and your GitHub account. Go forward (in case you dare) and provides Skynet — uh, I imply the AI — permission to entry your GitHub account options.

Subsequent, you'll be requested which GitHub account ought to get the ChatGPT connector. I’ve two, so I bought this alternative display. You may skip this display in case you solely have one account.

Now it's time for extra permissions. This time, you're giving permission to entry both all of your account's repos or only one. I chosen solely the my-private-site repo.

And now, theoretically, Deep Analysis in ChatGPT can be related to your repo. Theoretically. In follow, mine required one other step.

What to do if ChatGPT can't discover your repo

GitHub indexes repositories, and if ChatGPT doesn't present your repo as accessible, it most likely means GitHub hasn't listed your new repository but. That's what occurred right here.

I ought to have been capable of choose or kind in my full repo identify (keep in mind, davidgewirtz/my-private-site), however ChatGPT wasn't capable of find it.

Additionally: I tested ChatGPT's Deep Research against Gemini, Perplexity, and Grok AI to see which is best

To repair this, return to your GitHub account and sort within the command string proven on the prime of this screenshot. Clearly, change the textual content in blue to match your repo identify.

The command is principally repo:(repo adopted by a colon), adopted by the total identify of your repo, adopted by an area and the phrase import. This can inform GitHub you'd prefer it to index your repository.

As you possibly can see, GitHub confirmed it was now indexing my repository.

I brewed myself a well-deserved cup of espresso as a strategy to give GitHub time to index my repo. As soon as I completed the final drop, I went again to ChatGPT, dropped down the Deep Analysis menu, and located my newly created repository.

Have enjoyable with Deep Analysis

You're prepared to begin utilizing Deep Analysis in your repo. For an in depth information on how that labored for my repo, level your self to my earlier article on the subject.

Have enjoyable. I used to be fairly blown away. You could be, as effectively.

Additionally: 5 reasons I turn to ChatGPT every day – from faster research to replacing Siri

Have you ever tried utilizing ChatGPT Deep Analysis with your individual code but? What was your expertise connecting a GitHub repo? Did you run into any indexing points or permission snags alongside the way in which? Do you like utilizing GitHub Desktop or the command line when organising your repositories? Tell us within the feedback beneath.

You may observe my day-to-day challenge updates on social media. Make sure to subscribe to my weekly replace e-newsletter, and observe me on Twitter/X at @DavidGewirtz, on Fb at Fb.com/DavidGewirtz, on Instagram at Instagram.com/DavidGewirtz, on Bluesky at @DavidGewirtz.com, and on YouTube at YouTube.com/DavidGewirtzTV.

Get the morning's prime tales in your inbox every day with our Tech Today newsletter.

Synthetic Intelligence


Follow us on Twitter, Facebook
0 0 votes
Article Rating
Subscribe
Notify of
guest
0 comments
Oldest
New Most Voted
Inline Feedbacks
View all comments

Latest stories

You might also like...