Git Assignment -
c. Describe the steps to open a pull request?
- Push your branch with changes to the remote repository.
- Navigate to the repository on GitHub.
- Click the "Compare & pull request" button.
- Review the changes and add a description of what the pull request does.
- Click "Create pull request" to open the pull request for review.
d. Describe the steps to add a collaborator to a repository (share write permissions)
- Go to the repository on GitHub.
- Click on "Settings" and then navigate to the "Collaborators" section.
- Enter the GitHub username or email of the person you want to add as a collaborator.
- Click "Add collaborator". The user will receive an invitation to join the repository with write permissions.
e. What is the difference between git and GitHub?
Git is a distributed version control system that tracks changes in source code during software development. GitHub, on the other hand, is a cloud-based platform that hosts Git repositories and adds collaborative features like pull requests, issue tracking, and project management.
f. What does git diff do?
git diff
shows the differences between the files in your working directory and the index (staging area) or between the index and the last commit. It allows you to see what changes have been made that have not yet been committed.
g. What is the main branch?
The main branch is the primary branch of a repository, often referred to as main
or master
. It typically contains the stable version of the code that is ready for production or release.