Git & GitHub
/Beginner
Collaborators
Definition
Specific GitHub users who have been explicitly invited to have write access to a personal repository.
Explain Like I'm New
If you are working on a school project with a friend on your personal GitHub account, you can't use an 'Organization'. Instead, you go to your repo settings, type in your friend's username, and invite them as a 'Collaborator'. Now they can push code directly to your repository.
Real World Example
Inviting your hackathon teammates as collaborators so you can all push code to the same repository over the weekend.
Common Use Cases
- •Small team projects
- •Hackathons
- •Academic projects
Terminal Output
bash / terminal
/*
How to add a Collaborator:
1. Go to your Repository on GitHub.
2. Click 'Settings' (the gear icon).
3. Click 'Collaborators' on the left menu.
4. Click 'Add people'.
5. Search for their GitHub username and click Add.
IMPORTANT: They will receive an email. They MUST click the link
in the email to accept the invitation before they can push code!
*/
Interview Questions
basic
- Does your friend need a GitHub account to be added as a collaborator?
intermediate
- If a repository is Public, do you still need to add people as collaborators for them to help?