Welcome to the Git and GitHub Workshop Task!. To receive certified, you need to complete the following task. This task will help you understand the basics of Git and GitHub, which are essential tools for software development.
Here’s the guide with the task explanations included:
-
Fork the Repository: Start by forking the repository.
-
Clone the Repository: Clone the repository to your local machine.
git clone https://github.com/yourusername/repositoryname.git cd repositoryname
-
Create a New Branch: Create a new branch with a name that includes your name and surname (e.g.,
firstname-lastname
).git branch firstname-lastname git checkout firstname-lastname
OR
git checkout -b firstname-lastname
-
Create a Blank File: Create a blank text file with the name as your school ID number (e.g.,
20210702XXX.txt
) in your branch.touch 20210702XXX.txt
-
Commit and Push the Branch: Commit the new file and push your branch to the repository on GitHub.
git add 20210702XXX.txt git commit -m "Add blank file with school ID number" git push origin firstname-lastname
-
Edit the File: Open the file you just created and add your name and surname to it. Save the changes. For example, add:
John Doe
-
Commit and Push: Commit the changes you made to the file and push them to your branch.
git add 20210702XXX.txt git commit -m "Add name and surname to file" git push origin firstname-lastname
-
Create a Pull Request: Finally, create a Pull Request (PR) to merge your changes into the
submission
branch. We'll review your PR.
Go to your repository on GitHub, switch to the firstname-lastname
branch, and click “Pull Request” to merge into the submission
branch.
- Keep your commit messages clear and concise.
Good luck, and happy coding!