Configure Your Identity

Git attaches your name and email to every commit you make. This is how your contributions are identified on GitHub. You only need to do this once per machine.

1
Set your name and email globally
Replace the values with your actual name and the email you used to register on GitHub. The --global flag applies this to all repositories on your machine.
Terminal
git config --global user.name "Your Name"
git config --global user.email "your-email@example.com"
Example
git config --global user.name "Pavan Kumar"
git config --global user.email "pavan@gmail.com"
2
Verify the settings
Confirm that your name and email were saved correctly by listing all global config values.
Terminal
git config --global --list
Example
git config --global --list
# Output on your machine:
user.name=Pavan Kumar
user.email=pavan@gmail.com
Expected Output
user.name=Your Name
user.email=your-email@example.com

Generate an SSH Key

An SSH key is a pair of files — a private key (stays on your machine, never shared) and a public key (uploaded to GitHub). When you connect, GitHub checks that your private key matches the public key on file. No password needed after setup.

1
Generate the key pair
Use the email you registered on GitHub. The -t ed25519 flag selects a modern, secure key type. The -C flag adds your email as a label on the key.
Terminal
ssh-keygen -t ed25519 -C "your-email@example.com"
Example
ssh-keygen -t ed25519 -C "pavan@gmail.com"

After running the command, you will see 3 prompts. Press Enter each time without typing anything:

Prompt 1"Enter file in which to save the key (/home/user/.ssh/id_ed25519):"
→ Press Enter (accepts the default path ~/.ssh/id_ed25519)

Prompt 2"Enter passphrase (empty for no passphrase):"
→ Press Enter (leaves passphrase empty — no typing needed)

Prompt 3"Enter same passphrase again:"
→ Press Enter again (confirms empty passphrase)

Total: 3 Enter presses, nothing to type.

2
Start the SSH agent
The SSH agent runs in the background and manages your keys, so you don't have to re-enter your passphrase every time you push or pull.
Terminal
eval "$(ssh-agent -s)"
Example
eval "$(ssh-agent -s)"
# The agent starts and prints its process ID:
Agent pid 3721
Expected Output
Agent pid 12345
3
Add your private key to the agent
This loads your private key into the running SSH agent so it's available for authentication.
Terminal
ssh-add ~/.ssh/id_ed25519
Example
ssh-add ~/.ssh/id_ed25519
# Confirmation message shown:
Identity added: /home/pavan/.ssh/id_ed25519 (pavan@gmail.com)
Expected Output
Identity added: /home/youruser/.ssh/id_ed25519 (your-email@example.com)
4
Copy your public key
Display the public key in the terminal, then select all of it and copy it to your clipboard.
Terminal
cat ~/.ssh/id_ed25519.pub
Example — what gets printed (copy the entire line)
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOMqqnkVzrm0SdG6UOoqKLsabgH5C9okWi0dh2l9GkZQ pavan@gmail.com
5
Add the public key to GitHub
Paste the key you copied into your GitHub account settings.

⚠️ Important: This is your GitHub profile settings — not your repository settings. Go to your profile avatar (top-right corner) → Settings. This applies to your entire GitHub account, not a specific repo.

a
Click your profile avatar (top-right on GitHub) → SettingsSSH and GPG Keys (in the left sidebar under "Access")
b
Click New SSH Key
c
Give it a Title (e.g. My Laptop) so you can identify which machine this key belongs to
d
Paste the copied key into the Key field and click Add SSH Key

Trust GitHub's SSH Host Key

The very first time you connect to GitHub over SSH, your machine has never seen GitHub's server before. SSH will pause and ask you to confirm that the server is genuine before storing its fingerprint.

1
Connect for the first time
Run the command below. You will see a fingerprint prompt — this is normal and expected.
Terminal
ssh -T git@github.com
Example — type "yes" when you see this prompt
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
Warning: Permanently added 'github.com' (ED25519) to the list of known hosts.
What you'll see
The authenticity of host 'github.com (140.82.x.x)' can't be established.
ED25519 key fingerprint is SHA256:+DiY3wvvV6TuJJhbpZisF/zLDA0zPMSvHdkr4UvCOqU.
Are you sure you want to continue connecting (yes/no/[fingerprint])?

When you see the prompt, type yes (the full word, not just "y") and press Enter. SSH saves GitHub's fingerprint in ~/.ssh/known_hosts. From now on, every future connection is verified automatically — you'll never see this prompt again on this machine.

Test the SSH Connection

After adding your key to GitHub and accepting the host fingerprint, verify that authentication actually works end-to-end.

1
Run the authentication test
This command connects to GitHub and checks whether your SSH key is recognised — without cloning or opening a shell session.
Terminal
ssh -T git@github.com
Example — your GitHub username appears in the response
Hi pavankumar19! You've successfully authenticated, but GitHub does not provide shell access.
Expected Output (success)
Hi username! You've successfully authenticated, but GitHub does not provide shell access.

If you see your GitHub username in that message, your machine is now trusted. The phrase "does not provide shell access" is completely normal — it just means you can't log into GitHub's servers like a remote desktop, but you can push and pull code freely.

Clone a Repository Using SSH

Now that your machine is trusted, always use the SSH URL when cloning — not the HTTPS URL. This means no username or password prompts, ever.

1
Get the SSH URL from GitHub
On any GitHub repository page, click the green Code button → select the SSH tab → copy the URL. It always starts with git@github.com:
2
Clone the repository
Replace username with the GitHub account name and repository with the repo name. This creates a local folder with all the code inside.
Terminal
git clone git@github.com:username/repository.git
Example
git clone git@github.com:pavankumar19/mywebsite.git
# Creates a folder called "mywebsite" with all the repo files inside

Verify Your Remote

After cloning, confirm that the remote URL is SSH — not HTTPS. This ensures every push and pull uses your key, not a password prompt.

1
Check the remote URLs
Run this command inside your cloned repository folder.
Terminal
git remote -v
Example — SSH remote (correct)
origin  git@github.com:pavankumar19/mywebsite.git (fetch)
origin  git@github.com:pavankumar19/mywebsite.git (push)
Expected Output — SSH (correct)
origin  git@github.com:username/repository.git (fetch)
origin  git@github.com:username/repository.git (push)

If you see https://github.com/... instead, the remote is using HTTPS. Switch it to SSH with:

git remote set-url origin git@github.com:username/repository.git

Check Your SSH Configuration

If something isn't working, use verbose mode to see exactly what SSH is doing — which key it's trying, which step it reaches, and where it fails.

1
Run SSH in verbose mode
The -v flag prints a detailed log of the entire connection process. Use this any time a push or clone fails with a permission error.
Terminal
ssh -vT git@github.com
Example — key lines to look for in the verbose output
debug1: Offering public key: /home/pavan/.ssh/id_ed25519 ED25519
debug1: Server accepts key: /home/pavan/.ssh/id_ed25519 ED25519
Hi pavankumar19! You've successfully authenticated...
What to look for in the output
debug1: Offering public key: /home/youruser/.ssh/id_ed25519 ED25519
debug1: Server accepts key: /home/youruser/.ssh/id_ed25519 ED25519
Hi username! You've successfully authenticated...

What each line means:
"Offering public key" → SSH found your key file on disk
"Server accepts key" → GitHub recognised and approved it
— If neither line appears, your key is not loaded in the agent. Re-run ssh-add ~/.ssh/id_ed25519 and try again.

Save & Push Your Changes to GitHub

After editing files in your cloned repository, use these four commands in order to save your changes and send them to GitHub. This is the standard workflow you will repeat every time.

1
Check what changed — git status
Before doing anything, run this to see which files you modified, added, or deleted. It gives you a clear picture of what's pending.
Terminal
git status
Example — you edited index.html
git status

On branch main
Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)

        modified:   index.html

no changes added to commit
2
Stage your changes — git add
This tells Git which files to include in the next commit. Use git add . to stage everything, or name a specific file.
Terminal — stage all changed files
git add .
Terminal — stage a specific file
git add filename.html
Example
git add .
# Stages all modified files at once

git add index.html
# Stages only index.html
3
Commit your changes — git commit
A commit saves a snapshot of your staged files with a message describing what you changed. Write a short, clear message inside the quotes.
Terminal
git commit -m "your commit message here"
Example
git commit -m "add navigation bar to index.html"
# Output:
[main 4f2a1c3] add navigation bar to index.html
 1 file changed, 12 insertions(+), 0 deletions(-)

Write a message that describes what you changed, not why. Keep it short — under 72 characters. Examples: "fix typo in about page", "add contact form", "update footer links".

4
Push to GitHub — git push origin main
This uploads your committed changes from your local machine to GitHub. origin is the name of the remote (GitHub), and main is the branch name.
Terminal
git push origin main
Example — successful push output
git push origin main

Enumerating objects: 5, done.
Counting objects: 100% (5/5), done.
Writing objects: 100% (3/3), 342 bytes | 342.00 KiB/s, done.
To git@github.com:pavankumar19/mywebsite.git
   a1b2c3d..4f2a1c3  main -> main

After this, your changes are live on GitHub. If your repo is connected to GitHub Pages, the website updates automatically within a minute.

Complete workflow — run these 4 commands every time
Copy this entire block and run it after making any changes to your project.
Terminal — full workflow
git status
git add .
git commit -m "describe your change here"
git push origin main

Where GitHub is Used in the Real World

GitHub is not just for storing code. It is the foundation of modern software development, collaboration, and deployment — used by individuals, teams, and companies worldwide.

01
Personal Portfolio
Host your website for free with GitHub Pages — exactly like what you built in Session 4.
02
Team Projects
Multiple developers work on the same codebase simultaneously without overwriting each other's work.
03
Open Source
Anyone can contribute to public projects — from small tools to Linux and VS Code itself.
04
CI/CD Pipelines
Every push can automatically run tests and deploy to production — no manual steps needed.
05
Documentation Sites
Markdown docs hosted alongside the code — always in sync with the project version.
06
Academic & Research
Version control for data, scripts, analysis notebooks, and research paper drafts.
pull
git pull — bring remote changes to your machine
When a teammate pushes new code to GitHub, your local copy is out of date. git pull fetches their changes and merges them into your branch automatically.
Terminal
git pull origin main
Example — pulling teammate's changes
git pull origin main
# Output:
remote: Enumerating objects: 3, done.
Updating a1b2c3d..4f2a1c3
Fast-forward
 index.html | 5 +++++
 1 file changed, 5 insertions(+)
mrg
git merge — combine two branches into one
After finishing work on a feature branch, merge it into main to include your changes in the main codebase.
Terminal — switch to main first, then merge
git checkout main
git merge feature-branch
Example
git checkout main
git merge add-contact-page
# Output:
Updating 4f2a1c3..9d3e5a1
Fast-forward
 contact.html | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)
Branches
Work without breaking main
A branch is an independent copy of the codebase. You can experiment, add features, or fix bugs in isolation — without touching the working main branch. Think of it as a draft copy of your notebook.

Create a branch: git checkout -b feature-name
Switch branches: git checkout main
List branches: git branch
Pull Request
Request a review before merging
A Pull Request (PR) is a request to merge your branch into main. Before the code is merged, teammates can review it, leave comments, and suggest changes — ensuring quality before anything goes live.

On GitHub: push your branch → open a PR → assign a reviewer → merge after approval.

How LLMs Process Your Prompts

Every time you send a message to ChatGPT, Claude, or any LLM, it goes through the same pipeline. Understanding this helps you write better prompts and get more useful outputs.

You Write
Your Prompt
Question, instruction, or context you type
Model Sees
Context Window
System prompt + your message + full conversation history
Optional
Tools
Web search, code execution, file reading, connectors
You Receive
Structured Output
Text, code, JSON, markdown — shaped by your instructions
1
Prompt — what you write
The prompt is your input. The clearer and more specific it is, the better the output. Vague prompts give generic answers. Specific prompts with context, role, and format instructions give structured, useful answers.
Vague prompt vs. structured prompt
❌ Vague:   "Explain pointers"

✅ Structured: "You are a C programming teacher. Explain pointers
   to a first-year engineering student in 3 short bullet points
   with one code example. Use simple language."
2
Context Window — what the model can "see"
The context window is the total amount of text the model reads before generating a response. It includes the system prompt (instructions set by the app), your full conversation history, and any documents you pasted in. The model has no memory outside the current context window.

Why this matters: If you start a new chat, the model forgets everything from before. Always re-provide important context when starting fresh. Pasting a document or code file into the chat gives the model that information to work with.

3
Tools — extending what the model can do
Modern LLMs can use tools beyond just generating text. When a tool is available, the model decides whether to use it based on your prompt. You don't need to ask explicitly — the model picks the right tool for the task.
Web Search
Real-time information
Searches the internet to answer questions about current events, prices, documentation, or anything that may have changed after training.
Code Execution
Run and verify code
Executes Python or other code to perform calculations, process data, create charts, or verify that a solution actually works.
File Reading
Work with your documents
Reads PDFs, CSVs, spreadsheets, or text files you upload — so you can ask questions about your own data or documents.
Connectors
Connect to your apps
Integrates with Google Drive, Notion, Canva, GitHub, and other apps — letting the model read and write directly to the tools you already use.
4
Structured Output — shaping what you receive
LLMs can produce output in any format you specify. Tell it the format in your prompt and it will follow. This makes it easy to copy results directly into documents, code, or spreadsheets.
Ask for a specific output format
"Give me a 5-question quiz on linked lists.
Format: numbered list, question on one line,
answer on the next line in bold."

"Summarise this research paper in JSON with keys:
title, authors, problem, method, result, limitations."

Skills & Connectors for Educators

Claude Desktop is the native app for your computer. Beyond the chat interface, it supports Skills (prompt templates for specific tasks) and Connectors (integrations with apps you already use). Together they turn Claude into a personalised assistant for teaching, research, and content creation.

📄
Documentation Writer
Writing
Generate structured technical documentation — API references, README files, user guides, and project wikis from a brief description.
🎓
Research Paper Assistant
Academic
Outline, draft, and refine academic papers. Suggests section structure, generates abstracts, and rewrites paragraphs for clarity and tone.
🗂️
Lesson Plan Creator
Teaching
Generate complete lesson plans with learning objectives, activities, examples, and assessment questions for any topic and duration.
🔍
Code Explainer
Teaching
Paste any code block — Claude explains it line by line in plain language, perfect for preparing class examples or understanding unfamiliar code.
📁
Google Drive
Files & Documents
Read Docs, Sheets, and Slides from your Drive. Ask Claude to summarise a file, extract data from a sheet, or rewrite a document — without downloading anything.
🎨
Canva
Design
Describe what you need — a poster, slide deck, or infographic — and Claude works with Canva to create or update designs from natural language instructions.
✏️
Excalidraw
Diagrams
Generate flowcharts, architecture diagrams, and concept maps. Describe the diagram in text and Claude draws it in Excalidraw instantly.
🐙
GitHub
Code
Read repositories, review code, and understand project structure. Ask Claude to explain a file, find bugs, or suggest improvements across your codebase.

Suggested for Faculty — Connectors & Skills

Connectors to connect first:

📁 Google Drive — share lecture notes, question banks, and student materials directly with Claude
📝 Notion — organise course content, meeting notes, and research references in one workspace Claude can read
📧 Gmail / Google Calendar — schedule sessions, draft announcements, and summarise email threads
📊 Google Sheets — analyse student marks, generate summaries, and spot patterns across batch data

Skills to use regularly:

📋 Quiz Generator — create MCQs, fill-in-the-blank, and short-answer questions from any topic or uploaded notes
🗓️ Syllabus Designer — build structured course syllabi with unit-wise breakdowns, references, and assessment plans
📚 Research Summariser — paste or link a paper; get key problem, method, results, and limitations in 5 bullets
💬 Student Feedback Analyser — paste student responses and extract common themes, misconceptions, and strengths