Configure Git on RStudio
Configure Your SSH Keys
-
Select
from the toolbar.
The Options panel opens. -
Select Git/SVN from the side menu.
-
Click the Enable version control interface for RStudio projects option.
-
Enter the required information.
-
Click Create RSA Key.
To be able to push your code into your remote Git repositories, you must add the created public key on your hosting provider. Click View public key to view and copy the key. -
Click Apply.
If your sudo apt-get update sudo apt-get -y install openssh-client |
Create a Project From an Existing Git Repository
-
Select
from the toolbar.
The New Project panel opens. -
Create your project from a Version Control.
-
Choose Git as the version control system.
-
Enter your repository information.
-
Click Create Project.
Configure an Existing Repository
-
Select
from the toolbar.
The Project Options panel opens. -
Select Git/SVN from the side menu.
-
Change the version control system setting from (None) to Git.
-
Link this local Git repository to an existing remote repository by running the following command in the terminal:
git remote add origin https://github.com/<>/my-rstudio-project.git
You can now perform your first commit.
If your remote repository has not yet been initialized, you will need to push your first commit by running the following command : git push -u origin master |