The four commands you will repeat every time you edit files on your local machine — check, stage, commit, and push to GitHub.
Local Workflow
After editing files using Git Bash and a text editor (Sublime, VS Code, Notepad++) on your local machine, use these four commands in order to save your changes and send them to GitHub.
Before you start — navigate into your repository folder.
After cloning a repo with git clone, your terminal is still in the parent folder. You must cd into the repo before running any git commands, or they will fail with "not a git repository".
Replace mywebsite with your actual repository name. You only need to do this once per terminal session.
git statusgit status
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
git addgit add . to stage everything at once, or name a specific file to stage only that file.git add .
git add filename.html
git add . # Stages all modified files at once git add index.html # Stages only index.html
git commitgit commit -m "your commit message here"
git commit -m "add navigation bar to index.html" [main 4f2a1c3] add navigation bar to index.html 1 file changed, 12 insertions(+), 0 deletions(-)
Writing a good commit message — describe what you changed, not why. Keep it under 72 characters.
git push origin mainorigin is the name of the remote (GitHub), and main is the branch name.git push origin main
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 repository is connected to GitHub Pages, the website updates automatically within a minute.
git status git add . git commit -m "describe your change here" git push origin main
Concept
You have used both approaches during this programme. Here is how they differ, and when to use each one.
git add or git commit
cd into your repo folder, open files in Sublime / VS Code
git add, git commit, git push in Git Bash
git status, git add, git commit, git push
Which should you use? The web editor is great for a quick fix when you are away from your computer. For everything else — day-to-day editing, building your site, running code — use Git Bash and a local editor. The four commands you learned today (git status → git add → git commit → git push) are the same regardless of which editor you use to edit files.
AI Prompts
Copy either prompt into Claude or ChatGPT. Replace the highlighted placeholder with your own code or requirement and paste it in.
Paste any code you wrote or copied. The AI will break it down section by section in simple language, highlight key concepts, and end with a question to check your understanding.
Explain the following code to me as if I am a beginner.
[PASTE YOUR CODE HERE]
Please:
1. Give a one-line summary of what this code does overall.
2. Go through it section by section — explain each part in plain English.
3. Highlight any key concepts or patterns used (bold them).
4. Point out anything that might be confusing for a beginner and explain why it works that way.
5. End with one question to check if I understood.
Keep your explanation concise and avoid jargon.
How to use: Replace [PASTE YOUR CODE HERE] with your actual code — delete that line and paste your code in its place. Works for C, Python, JavaScript, HTML, or any language.
Describe what you want the code to do. The AI will write beginner-friendly code with comments on each block, then explain how it works in plain English.
Write code that does the following: [DESCRIBE WHAT YOU WANT THE CODE TO DO] Requirements: - Language: [YOUR PREFERRED LANGUAGE — e.g. Python, JavaScript, C] - Keep it beginner-friendly — use clear variable names and avoid complex patterns. - Add a short comment above each logical block explaining what that block does. - After the code, give a 2–3 sentence explanation of how it works overall. - If there are multiple ways to do this, show the simplest approach first.
How to use: Replace [DESCRIBE WHAT YOU WANT] with your requirement (e.g. "calculate the average of 5 numbers entered by the user") and [YOUR PREFERRED LANGUAGE] with C, Python, JavaScript, etc.
Paste your index.html which already has anchor tags to your quiz pages. The AI reads those links and generates a new course-directory.html with a styled table — S.No, course name, file, and an Open link for each page.
I have an index.html page that already has anchor tags linking to my quiz pages. Read it and generate a course directory table page.
--- index.html ---
[PASTE YOUR index.html CODE HERE]
Now generate a new HTML file called course-directory.html that reads the anchor tags in index.html and builds a table with these columns:
1. S.No — serial number (1, 2, 3 …)
2. Course Name — the link text or title from each anchor tag
3. File — the href value (e.g. quiz1.html, quiz2.html)
4. Link — a clickable "Open →" button linking to that file
Requirements:
- Use only HTML and CSS (no external libraries or frameworks)
- Style the table with a clear header row, alternating row background colors, and a border
- Wrap the table in a div with overflow-x: auto so it scrolls on small screens
- Add a page heading "Course Directory" at the top
- Keep the design clean and minimal
- Include a "Back to Home" link at the bottom pointing to index.html
How to use: Paste the source of your index.html in place of the placeholder — the AI will extract your anchor tags and build the table automatically. Get the source by opening index.html in a browser → right-click → View Page Source → select all → copy.