-
Navigate to Settings:
- Open your GitHub repository.
- Click on Settings in the top menu.
-
Enable GitHub Pages:
- Scroll to the Pages section.
- Under the Source dropdown, select a branch (e.g.,
main) and the root folder. - Click Save.
-
Check the Public Link:
- GitHub will provide a URL like
https://yourusername.github.io/repo-name/. - Open the link in a browser to ensure it’s visible to everyone.
- GitHub will provide a URL like
-
Fork the Repository:
- Go to git-cafe-exercise.
- Click Fork at the top-right corner to copy it to your account.
-
Clone the Fork:
git clone https://github.com/yourusername/git-cafe-exercise.git cd git-cafe-exercise -
Modify
index.html:- Open the file
index.htmlin your editor. - Change
Welcome to our placetoWelcome to our restaurant.
- Open the file
-
Commit and Push Changes:
git add index.html git commit -m "message" git push origin main -
Raise a Pull Request (PR):
- Go to your forked repository on GitHub.
- Click Contribute → Open pull request.
- Describe the changes and submit the PR.
Each exercise involves working on the forked copy of
git-cafe-exercisefrom Bundle 5.
-
Create a Feature Branch:
git checkout -b new-feature
-
Add a New Page:
- Create a file named
menu.html.
- Create a file named
-
Commit and Push:
git add menu.html git commit -m "Added menu page" git push -
Raise a PR:
- Open a PR from
new-featuretomainon GitHub. - Request a review.
- Open a PR from
-
Create a Bug Fix Branch:
git checkout -b bug-fix
-
Fix the Title:
- Open
index-4.html. - Change the title to
Contact.
- Open
-
Commit and Push:
git add index-4.html git commit -m "Fixed title in index-4.html" git push -
Raise a PR:
- Open a PR from
bug-fixtomain. - Request a review.
- Open a PR from
-
Update the Phone Number:
- Edit
index-4.html. - Change
+1 800 603 6035to+1 800 659 6035.
- Edit
-
Commit and Push:
git add index-4.html git commit -m "Updated contact phone number" git push -
Raise a PR:
- Open a PR from
bug-fixtomain. - Request a review.
- Open a PR from
-
Access Peers’ Repositories:
- Ensure your peers grant you collaborator access to their repositories.
-
Review PRs:
- Open their PRs.
- Review the code and request changes if needed (e.g., add comments or improve formatting).
-
Approve and Merge:
- After the requested changes are made, approve the PR and merge it.