AI Hints
Home›Git & GitHub Tutorial›A Tour of GitHub
Git & GitHub · Lesson 82 of 144

Collaborators and Access

Who can push.

⏱ 2 min read▶ Video at 1:29:18🎓 Free
Watch this lesson in the Git & GitHub courseWatch on YouTube ↗Full Git & GitHub course

By default, only you can push to your repository. To work with a teammate directly, you invite them as a collaborator. For bigger groups, GitHub has organisations, with teams and roles.

Collaborators and Access
From the video: Collaborators and Access
  • Only you can push, at first
  • Invite collaborators
  • Organisations for bigger groups

Inviting a collaborator

Open settings, then collaborators. Click add people, and search for your teammate's GitHub username. They get an email invitation. Once they accept, they can push branches to your repository, and open pull requests from them.

  1. SettingsCollaborators
  2. Add peopleby username
  3. They acceptthe invitation
  4. They pushbranches and PRs
Inviting a collaborator
From the video: Inviting a collaborator

Collaborator or fork?

So when do people use forks, and when collaborators? Collaborators are trusted teammates, who push branches to the same repository. Forks are for everyone else, like open source contributors. They can't push to your repository, so they work in their own copy, and send pull requests.

Collaborator

  • Trusted teammate
  • Pushes to your repo
  • Branches + PRs

Fork

  • Anyone
  • Works in their copy
  • PRs from the fork

Summary

Invite trusted teammates as collaborators. Everyone else contributes through forks. Next, a handy tool for when you're interrupted mid-task.

Key takeaways
  • Settings, Collaborators
  • Teammates push branches
  • Others use forks
Next up: Stashing Work — git stash