Session - Getting copies of existing repositories (fork and clone)
All this course has been about you creating a new repository but what about collaboration with existing projects?
Using the function create_from_github()
means that it:
C:/Users/zoe.turner
Cloned message:
✔ Setting `fork = FALSE`
✔ Creating 'C:/Users/zoe.turner/r4ds-ed2-exercise-solutions/'
✔ Cloning repo from 'https://github.com/nhs-r-community/r4ds-ed2-exercise-solutions.git' into 'C:/Users/zoe.turner/r4ds-ed2-exercise-solutions'
✔ Setting active project to 'C:/Users/zoe.turner/r4ds-ed2-exercise-solutions'
ℹ Default branch is 'main'
✔ Opening 'C:/Users/zoe.turner/r4ds-ed2-exercise-solutions/' in new RStudio session
✔ Setting active project to '<no active project>'
Forked message (will also appear in your GitHub):
✔ Setting `fork = TRUE`
✔ Creating 'C:/Users/zoe.turner/nhspy-plotthedots/'
✔ Forking 'nhs-pycom/nhspy-plotthedots'
✔ Waiting for the fork to finalize before cloning
✔ Cloning repo from 'https://github.com/Lextuga007/nhspy-plotthedots.git' into 'C:/Users/zoe.turner/nhspy-plotthedots'
✔ Setting active project to 'C:/Users/zoe.turner/nhspy-plotthedots'
ℹ Default branch is 'main'
✔ Adding 'upstream' remote: 'https://github.com/nhs-pycom/nhspy-plotthedots.git'
✔ Pulling changes from 'upstream/main'.
✔ Setting remote tracking branch for local 'main' branch to 'upstream/main'
✔ Writing 'nhspy-plotthedots.Rproj'
✔ Adding '.Rproj.user' to '.gitignore'
✔ Opening 'C:/Users/zoe.turner/nhspy-plotthedots/' in new RStudio session
✔ Setting active project to '<no active project>'
Select the green button for <> Code
and it will give you an option to clone
This course has used https
and the copy button to the right takes the whole code
Fork
to your own repository and then Clone
from there to your computer:
With the copied HTTPS url, in RStudio you will need to start a new Project and use the third option (possibly ignored until now!) for versioning:
Posit Cloud is already a project!