Lesson 08 — A Complete Beginner Workflow
Practice the full Git/GitHub workflow from start to finish.
Full workflow
Section titled “Full workflow”clone → branch → edit → status → add → commit → push → PR → review → merge → pullChecklist
Section titled “Checklist”1. Clone or open the repository
Section titled “1. Clone or open the repository”If you do not already have it locally:
git clone https://github.com/organization/repository-name.gitcd repository-name- I am inside the repository folder.
2. Start from main
Section titled “2. Start from main”git checkout maingit pullor:
git switch maingit pull- I am on an up-to-date
mainbranch.
3. Create a branch
Section titled “3. Create a branch”git checkout -b docs/add-practice-noteor:
git switch -c docs/add-practice-note- I created a branch for my change.
4. Make a small change
Section titled “4. Make a small change”Edit a file, such as README.md.
- I made one small change.
5. Check status
Section titled “5. Check status”git status- I can see my changed file.
6. Stage the change
Section titled “6. Stage the change”git add README.md- I staged the file.
7. Commit the change
Section titled “7. Commit the change”git commit -m "docs: add practice note"- I committed the change.
8. Push the branch
Section titled “8. Push the branch”git push -u origin docs/add-practice-note- I pushed the branch to GitHub.
9. Open a pull request
Section titled “9. Open a pull request”- I opened GitHub.
- I created a PR from my branch into
main. - I added a short title and description.
10. Update if needed
Section titled “10. Update if needed”If feedback is requested:
git add README.mdgit commit -m "docs: address feedback"git push- I understand that pushing to the same branch updates the PR.
11. Merge the PR
Section titled “11. Merge the PR”After review:
- The PR is approved or ready.
- The PR is merged.
- The branch is deleted on GitHub if no longer needed.
12. Update local main
Section titled “12. Update local main”git checkout maingit pullor:
git switch maingit pull- My local
mainhas the merged change.
Final completion check
Section titled “Final completion check”- I completed one full Git/GitHub workflow.
- I can describe each step in my own words.
- I know to use branches instead of changing
maindirectly. - I know to use PRs for review before merging.
- I know to run
git statusoften.