Git Assignment - Sairotech
Questions and Answers
a. What is an issue?
Issues are used to track todos, bugs, feature requests, and more.
b. What is a pull request?
It is a request to merge the changes in a repo. It lets others review before they are included in the main project.
c. Describe the steps to open a pull request?
• ensure the changes are committed and pushed to the remoe repo.
• click pull request
• click New pull request
• choose the branch you made changes and the branch you want to merge your changes(base branch and compare branch) -review changes and click 'create pull request'
d. Describe the steps to add a collaborator to a repository (share write permissions)
Open the repo --> settings --> collaborators --> manage access --> Invite a collaborator --> enter their username and choose permissions --> send the invitation and wait for acceptance.
e. What is the difference between git and GitHub?
Git - Tool for tracking changes in the code makin git easier to develop a software. Github - It is a web platform to store and share repositories online and collaborate with others in a project.
f. What does git diff do?
It shows the differenc between files or commits in a repository.
g. What is the main branch?
It is the default branch that Git has when a repository is created.
h. Besides our initial commit if it is a new repository, should we directly push our changes directly into the main branch?
It is recommended to use separate branches for new features or fixes and then merge them into the main branch. This will keep the main branch stable and allows for code review.