1 of 15

Collaborating using Git

R Ladies Git Workshop: 4/14/2023

2 of 15

Adding collaborators to your repositories

3 of 15

Working with someone else’s repository

  • You can fork their repository (allows you to make changes on a copy of the repository without affecting original project)
  • You can clone the repository (if you have collaborator access from owner, allows you to make changes to original project)

4 of 15

Forking someone else’s repository

  • Changes you make will only be saved to a new repository in YOUR account, will not affect owner’s
  • If you’d like to submit your changes to the owner, submit a pull request

5 of 15

Forking someone else’s repository

6 of 15

Forking someone else’s repository

7 of 15

Forking someone else’s repository

8 of 15

Forking someone else’s repository

9 of 15

Forking someone else’s repository

  • Clone to Rstudio
  • Make changes to Git workshop example code
  • Commit and Push changes as usual (to your github account)

10 of 15

Forking someone else’s repository

11 of 15

Forking someone else’s repository

12 of 15

Forking someone else’s repository

  • Owner of repository can review your pull request, and merge it to their original repository
  • If you are an approved collaborator, you have the ability to merge your own pull request to the owner’s original repository

13 of 15

Cloning someone else’s repository

  • Make changes directly to owner’s repository (best practice to push changes to your own branch, rather than main)
  • Have to have collaborator access to that repository

14 of 15

Cloning someone else’s repository

15 of 15

Cloning someone else’s repository

  • Once you clone repository in Rstudio,
  • Pull
  • Make changes
  • Commit
  • And Push as normal
  • [If you do not have collaborator access from owner of repository, you will see an error message when trying to push commit]