Adding a collaborator means giving another person permission to edit your code

To add a collaborator in GitHub, go to your repository, click Settings, then Collaborators, and enter their GitHub username or email address. GitHub will send them an invitation, and once they accept, they can push changes directly to your repository. This is the fastest way to let teammates edit your code without creating separate copies.

The person you invite needs a GitHub account before you can add them. If they don't have one, they can create a free account at github.com in a few minutes. After they accept your invitation, they'll have the same access to your code as you do — they can create branches, make commits, and merge changes.

Key Takeaways

  • Collaborators need their own GitHub account and must accept an invitation before they can edit your repository.
  • You can add collaborators only if you own the repository or have admin access to it.
  • GitHub sends an email invitation automatically, and the person can accept it from their email or their GitHub notifications.
  • Different permission levels (pull, push, admin) control what collaborators can do, so choose the right one for each person's role.

Step-by-step: inviting a collaborator

Open the repository on GitHub and click the Settings tab near the top right of the page. On the left sidebar, click Collaborators. If you're asked to confirm your password, enter it.

Click the green Add people button. Type the person's GitHub username, full name, or email address in the search box. GitHub will show matching accounts as you type. Click the person's name to select them, then choose a permission level from the dropdown menu. Click Add [name] to this repository to send the invitation.

GitHub sends an email to the person right away. They can accept the invitation by clicking the link in the email, or they can go to their GitHub notifications and accept it there. Once they accept, they appear in your collaborators list and can start making changes.

Understanding permission levels

Pull permission lets someone view your code and suggest changes through pull requests, but they cannot push changes directly. Use this for outside contributors or people you want to review before merging. Push permission lets someone make changes and push them directly to the repository without review. Use this for trusted teammates who work on the same project daily.

Admin permission gives full control — the person can change settings, delete the repository, and manage other collaborators. Only give admin access to people you trust completely, usually just the project owner or lead developer. You can change someone's permission level anytime by clicking the dropdown next to their name in the collaborators list.

What happens after someone accepts

Once a collaborator accepts your invitation, they can clone your repository to their computer and start working. They can create their own branches, make commits, and push changes back to GitHub. All their commits will show up in your repository's history with their name and profile picture attached.

If you're working on the same files, you may run into merge conflicts — situations where you both changed the same lines and Git doesn't know which version to keep. This is normal and happens even with experienced teams. GitHub has tools to help resolve conflicts, and most teams prevent them by dividing work so different people edit different files.

Removing a collaborator

If someone no longer needs access, go back to Settings > Collaborators and click the X button next to their name. They lose access when ready and cannot push changes anymore. Their old commits stay in the repository history, but they cannot make new ones.

Removing someone does not delete their work — all their previous commits remain visible. It only stops them from making future changes. If you want to undo a specific commit they made, you can revert it separately.

Collaborators vs. organizations

Adding individual collaborators works well for small teams or open-source projects with a few contributors. If your team is larger or you have multiple projects, GitHub Organizations are more efficient. Organizations let you create teams, manage permissions across many repositories at once, and keep work organized by project.

For a small group working on one or two repositories, individual collaborators are simpler to set up. For a company or large open-source project with dozens of people, an organization saves time and reduces mistakes. You can always convert a regular repository to an organization later if your team grows.

Frequently Asked Questions

Can I add someone who doesn't have a GitHub account yet?

No, they must create a free GitHub account first. You can send them the link github.com/signup and ask them to choose a username. Once their account is active, you can add them as a collaborator.

What if someone doesn't see the invitation email?

Ask them to check their spam folder or log into GitHub and look at their notifications — the invitation appears there too. If they still don't see it, you can resend it by going to the collaborators list and clicking the resend icon next to their name.

Can I limit what files a collaborator can edit?

GitHub's built-in permissions don't let you restrict access to specific files. If you need that level of control, you can use branch protection rules to require code review before merging, which gives you a chance to catch unwanted changes.

What's the difference between a collaborator and a fork?

A collaborator works directly on your repository and their changes go straight in. A fork is a separate copy that someone owns — they can change it however they want, and you decide whether to merge their changes back. Use collaborators for teammates, forks for outside contributors.

Can I see what changes a collaborator made?

Yes. Go to the Commits tab and you'll see every commit with the person's name and what they changed. Click any commit to see the exact lines they added or removed. This is how teams track who changed what and when.