Lab-3-2
(2.5% of the course mark)
GitHub Collab Lab
- This lab is designed to introduce you to the fundamental concepts and workflows of GitHub, a popular platform for version control and collaboration. By the end of this lab, you will be familiar with the basic operations of GitHub, including creating repositories, making commits, branching, and collaborating with others.
Lab objectives
-
Become proficient in basic GitHub operations such as creating repositories, making commits, creating branches, and merging changes.
-
Understand the importance of version control in software development and how GitHub facilitates collaboration and history tracking.
-
Develop skills in collaborating with others on software projects using GitHub's features like pull requests, issues, and branches.
-
Learn how to organize code using repositories and branches effectively, ensuring a structured and manageable codebase.
-
Get familiar with common Git commands used in conjunction with GitHub, such as git clone, git add, git commit, git push, git pull, and git merge.
-
Learn and adhere to best practices for using GitHub, including clear commit messages, meaningful branch names, and effective pull request reviews.
-
Improve their project management skills by utilizing GitHub's issue tracking and project boards for task management and progress tracking.
There are many ways to perform GitHub repository operations like cloning, pushing, pulling, fetching, merging, and committing. Below are the alternatives:
-
GitHub Desktop
-
Git Command Line
-
VSCode Git Extention
This course will use GitHub Desktop as the tool to manage GitHub repositories. Feel free to use any Git alternative methods that you know how to use.
Do not proceed to this lab until you have finished Lab-3-1.
Collaborator Setup
-
Send your GitHub username to your instructor. Your instructor will Add you as a Collaborator.
-
You should receive an email with an invitation to collaborate. Ensure to accept the invitation.
Cloning Repos
-
Open GitHub Desktop and click on File >> Clone repository…
-
Click on the Url tab and enter the repo url: https://github.com/roderickkit-bernardo/COMP9783-59774-Code-Collab and click on Clone.
Pay attention to the local path, this is where you would find the repository locally.
-
Go to the local path and open README.md and take note of the branch name that is assigned to you. Use this branch name on step 5.
-
Create a new branch, click on Branch >> New Branch.
-
Enter your assigned branch and click on Create branch.
-
On VSCode, click on Open Folder… and choose the local path of this repository (This is the path from step 2).
-
Navigate to: src/data/CardItems.js and update the JSON object with your information.
-
Edit README.md and look for your name, change the Status from: Pending to: Done.
-
Open GitHub Desktop, ensure that the changes are visible, add any commit title and description and click on Commit to name of your branch where name of your branch is the branch name assigned to you.
-
Click on Publish branch.
-
Click on Preview Pull Request. It should compare the differences between the main and your branch.
-
Click on Create pull request.
-
Enter the pull request title and description.
-
Click on Create pull request.
-
Since your instructor is the main code owner, your changes should not merge automatically. Your instructor should be able to review your code and merge the pull request.
Submission
- Inform your instructor via email that you have a pending pull request that needs to be merged. If the changes are good, your pull request will be approved; otherwise, it will be sent back to you and make changes based on the reviewer comments.