GitHub Homework: Understanding GitHub
Introduction
GitHub is a powerful platform for collaboration, code management, and version control. It allows individuals and teams to work on projects together, track changes, and manage their codebase efficiently. This homework assignment aims to provide an overview of GitHub and its key features.
Objectives
- Understand the basics of version control.
- Learn how to create and manage repositories on GitHub.
- Familiarize yourself with common GitHub commands.
- Gain knowledge of collaborating with others on GitHub.
- Explore GitHub's features for issue tracking and project management.
Tasks
-
Sign up for GitHub
- If you don't have a GitHub account, sign up for one at GitHub.com.
-
Create a Repository
- Create a new repository on GitHub.
- Name it "GitHub Homework".
- Initialize it with a README file.
-
Clone Repository
- Clone the repository to your local machine using the
git clone
command.
- Navigate into the repository directory.
-
Add Files
- Create a new text file named "homework.txt" in the repository directory.
- Add some sample text to the file using any text editor.
- Stage the file for commit using
git add
.
-
Commit Changes
- Commit the changes to the repository using
git commit
.
- Provide a meaningful commit message describing your changes.
-
Push Changes
- Push the committed changes to the remote repository on GitHub using
git push
.
-
Branching
- Create a new branch named "feature-branch" using
git branch
.
- Switch to the new branch using
git checkout
.
- Make changes to the "homework.txt" file in this branch.
- Commit and push the changes to the "feature-branch".
-
Merge Branch
- Merge the "feature-branch" into the main branch using a pull request on GitHub.
- Resolve any conflicts if they arise.
-
Collaboration
- Invite a classmate or friend to collaborate on your GitHub repository.
- Give them appropriate access permissions.
-
Issue Tracking
- Create an issue in your repository.
- Assign the issue to yourself or your collaborator.
- Add labels and a milestone if applicable.
-
Project Management
- Create a project board in your repository.
- Add columns such as "To Do," "In Progress," and "Done."
- Move the issue you created earlier through the project board as you work on it.