GitHub Setup and AI Tools
Thursday working lecture: create the course repository, clone it, and make one coding agent available
This is Part 1 of Thursday’s working lecture. We will create the course repository on GitHub, make a local clone on your computer, and make one AI coding agent available for that clone. We will complete the setup together in class, so you do not need to finish it in advance.
By the end of Part 1, you should have: a GitHub repository named stat432-fall2026, a local clone of that repository, and one coding agent that can work inside the clone.
1. Understand the Workflow
The three parts of the setup have different roles:
- The repository on GitHub is the version of your course work that can be viewed online. This is where submitted files must appear.
- The local clone is the copy of the repository on your computer. You create and edit files here.
- The AI coding agent can work with files in the local clone. It can inspect files, run commands, and propose changes with your permission, but it does not replace GitHub.
You must have one AI coding agent available for the course, but using it is optional. Repository setup, troubleshooting, coding, formatting, and submission checks can be much easier with an agent.
Your usual workflow will be:
edit locally -> review changes -> commit -> push -> verify on GitHub
A commit records a version in the local Git history. A push sends committed changes to GitHub. A file is not submitted merely because it exists on your computer.
2. Create the GitHub Repository
Create or check your account
If you do not have a personal GitHub account, follow GitHub’s official guide to create an account. Verify the email address associated with the account. GitHub requires a verified email address for basic tasks such as creating a repository.
If you already have an account, sign in and make sure you know your GitHub username. GitHub also recommends two-factor authentication.
Complete sign-in through the official GitHub website or application. Never paste a password, access token, private key, or authentication code into an AI conversation.
After you have created or confirmed your GitHub account, submit the account you will use for STAT 432 through the GitHub account information form.
Create an empty course repository
Use GitHub’s official instructions for creating a repository. Use these settings:
- Owner: your personal GitHub account
- Repository name:
stat432-fall2026 - Visibility: use the setting specified by the instructor in class
- Initialize the repository: do not add a README,
.gitignore, or license yet
The repository is intentionally empty. In Part 2, you can create the required .gitignore and submission structure manually or use the course skill to make the process easier.
Before continuing, check the owner, repository name, and visibility on GitHub. If the visibility requirement has not yet been announced, ask the instructor before choosing it. If you already created the repository with different settings, do not create a second repository. Inspect the existing repository using the steps below, with or without help from an agent.
3. Prepare Your Computer and Choose One Agent
Install Git and GitHub CLI
The recommended traditional setup uses two programs:
- Git is required. It records commits and synchronizes the local clone with GitHub.
- GitHub CLI is strongly recommended. Its command is
gh. It provides browser-based authentication and can configure Git to use GitHub CLI as its credential helper. GitHub CLI normally stores its authentication token securely in the system credential store. When your AI coding agent runs Git or GitHub CLI commands, it can use that authenticated session without you copying or pasting the token into the chat. If GitHub CLI reports plain-text storage, ask for help before continuing.
You also need a terminal. Windows users can use PowerShell, Windows Terminal, or Git Bash. macOS and Linux already provide a terminal application.
- Install Git from the official Git download page.
- Install GitHub CLI from the official GitHub CLI page.
- If you prefer a graphical Git interface on Windows or macOS, use GitHub’s guide to install and authenticate GitHub Desktop. GitHub Desktop is not an AI coding agent.
Git for Windows includes Git Credential Manager. It can also open a browser when Git needs authentication. For a consistent classroom workflow across operating systems, we will use GitHub CLI in the command-line instructions below.
If Git asks for an author name or email before your first commit, use an email address associated with GitHub or your GitHub-provided private email address.
Make one AI coding agent available
You need access to only one agent. Choose an interface you can access and are comfortable using. Account and plan requirements vary by tool, so consult its official setup page.
| Interface | Option | Official setup resource |
|---|---|---|
| Desktop application | ChatGPT desktop app with Codex | ChatGPT desktop app |
| VS Code extension | Codex IDE extension | Codex IDE extension |
| Terminal | Codex CLI | Codex CLI |
| VS Code extension | Claude Code | Claude Code for VS Code |
| Terminal | Claude Code | Claude Code quickstart |
| VS Code extension | GitHub Copilot | GitHub Copilot quickstart |
| Terminal | Gemini CLI | Gemini CLI quickstart |
If you want an editor extension and do not have VS Code, begin with the official VS Code download. Another coding agent is also acceptable if it can work with files in a local folder. Use only its official installation instructions.
Ask a chatbot for help using the name of your operating system, the tool you are installing, the step you attempted, and the exact error message. Remove usernames, file paths, tokens, and other private information first. If the problem remains, bring the error message to class.
4. Traditional Command-Line Setup
If you prefer to use the command line to set up your local course repository and connect it to GitHub, follow the steps below. You may instead ask your AI coding agent to run these commands for you. You will still need to complete any browser-based sign-in yourself.
These commands work in PowerShell, Git Bash, macOS Terminal, and common Linux shells. Replace YOUR-USERNAME with your GitHub username. Do not type the prompt symbols sometimes shown in online examples.
Step 2: Authenticate through the browser
Run the following commands:
gh auth login --hostname github.com --git-protocol https --web
gh auth setup-git --hostname github.com
gh auth status --hostname github.comThe first command starts GitHub’s browser-based sign-in flow. If the browser does not open automatically, use the URL shown in the terminal. Enter any one-time code only on the official GitHub page, never in an AI chat. The second command tells Git to use GitHub CLI as its credential helper. The third confirms which GitHub account is active. It should show the same username that owns stat432-fall2026.
If a Git operation asks for a GitHub password, cancel it. Run the three authentication commands above instead. Never paste a personal access token into an AI conversation, classroom chat, screenshot, or shared document. Do not run gh auth status --show-token.
Step 3: Clone and verify the repository
Open the terminal in the parent folder where you want to keep your course repository. Then run:
git clone https://github.com/YOUR-USERNAME/stat432-fall2026.git
cd stat432-fall2026
git rev-parse --show-toplevel
git remote get-url origin
git branch --show-current
git statusBecause the repository begins empty, Git may print a warning that you cloned an empty repository. That warning is expected. The command git clone creates the local folder and the connection named origin; do not run git init or git remote add origin afterward.
The repository root should end in stat432-fall2026, and the origin URL should contain your GitHub username and the exact repository name.
Cloning a public repository does not test whether you can push. The first push in Part 2 is the final connection test, so confirm that the committed file appears on GitHub before considering the setup complete.
Common authentication and connection problems
gitorghis not recognized: close and reopen the terminal. If the problem remains, reinstall the missing program from its official page.- The wrong GitHub account is active: run
gh auth status --hostname github.com. If several accounts are available, usegh auth switch --hostname github.com --user YOUR-USERNAME. - A password prompt appears: cancel it, then repeat the three commands in Step 2.
- Git reports
Repository not found: check the GitHub username, repository spelling, visibility, and active account. - Git reports
remote origin already exists: you are probably already inside a linked repository. Rungit remote -vand inspect the URL rather than adding another remote. - A later push is rejected: do not force-push. Preserve the error message and ask the instructor, TA, or your agent to explain it.
Authentication and repository connection are different. gh auth login signs your computer in to GitHub. git clone creates the local clone and connects it to the GitHub repository.
5. Open the Repository and, If Useful, an Agent
If you completed Section 4, do not clone the repository again. Open the existing stat432-fall2026 folder in your chosen interface.
If you prefer a graphical cloning route instead of Section 4:
- GitHub Desktop: sign in, choose File > Clone Repository, select
stat432-fall2026, and choose its local location. - VS Code: follow the official source-control quickstart, use Git: Clone from the Command Palette, and open the cloned folder.
If you want agent assistance, open the local clone with your coding agent:
- ChatGPT desktop app: open the local clone as the project folder and use Codex there.
- VS Code extension: open
stat432-fall2026with File > Open Folder, then open your extension’s chat. - Terminal agent: open a terminal inside
stat432-fall2026, then start Codex CLI, Claude Code, Gemini CLI, or another terminal agent.
Do not give the agent your entire home folder, Documents folder, or another broad directory as its working location.
Optional: ask the agent to verify the connection
If useful, open your agent inside the local clone and use this prompt:
I am preparing my STAT 432 repository, stat432-fall2026.
Check that you are working inside its local Git repository. Verify that
Git is available, show me the repository root and current branch, and
confirm that the remote named origin points to my stat432-fall2026
repository on GitHub. If Git needs my author name or email, explain how
to configure it and ask before changing anything.
Do not create submission folders or change repository files yet. Explain
the result clearly. Do not ask me to paste a password, access token,
private key, or authentication code into this chat.
The exact buttons and messages depend on the interface. Whether you check manually or use an agent, confirm that the local clone points to your repository on GitHub. If you use an agent, also confirm that it is working inside the correct local clone.
Read proposed commands and file changes before approving them. Keep the agent inside stat432-fall2026, and complete account authentication only through an official application or browser window.
6. Check the Result and Continue to Part 2
Part 1 is complete when:
Do not rely only on the agent’s summary. Open GitHub in your browser and confirm the repository owner, name, and visibility yourself.
In Part 2, the portable stat432-fall2026-student skill can create and check this course structure:
stat432-fall2026/
|-- .gitignore
|-- discussion/
|-- homework/
`-- project/
The skill contains the exact submission paths and file-format rules. You may use it, or complete the same checks manually, while preparing the first discussion question. In either case, verify the complete cycle: review, commit, push, and confirm the committed file on GitHub.