a. What is an issue?
An issue is a way to track enhancements, tasks, or bugs for your work on GitHub.
b. What is a pull request?
A pull request is a method of submitting contributions to a project. It allows you to notify others about changes you've pushed to a repository on GitHub.
c. Describe the steps to open a pull request?
- Push your branch to GitHub.
- Navigate to the repository on GitHub.
- Click on the "Pull Requests" tab.
- Click "New Pull Request."
- Select the branch you want to merge into the main branch.
- Provide a title and description for the pull request.
- Click "Create Pull Request."
d. Describe the steps to add a collaborator to a repository (share write permissions)?
- Go to your repository on GitHub.
- Click on the "Settings" tab.
- In the left sidebar, click "Collaborators."
- Click "Add People."
- Enter the username of the person you want to add.
- Select the user from the list and click "Add."
e. What is the difference between git and GitHub?
Git is a distributed version control system for tracking changes in source code, while GitHub is a platform that hosts Git repositories and provides a web interface, collaboration features, and more.
f. What does git diff do?
git diff shows the differences between the files in your working directory and the last committed versions of those files.
g. What is the main branch?
The main branch (formerly known as master) is the default branch that most repositories use as the main development branch.
h. Besides our initial commit if it is a new repository, should we directly push our changes directly into the main branch?
It is generally recommended to create a new branch for changes and then merge them into the main branch through a pull request, ensuring code review and testing before merging.