If you already know which online repository you want to use for your projects, option c) is more convenient.ī) Create a new project from a folder under version control: In this case you only need to create a new RStudio project for that directory and version control is automatically enabled. In order to push to a remote repository later on you add that remote repository by using the Git shell. There are three ways to create version control for a RStudio project.Ī) Create a new project and create a local Git repository: Select File > New Project., create a project from a New Directory and check the option Create a git repository. Git config -global user.email 2: Create a new RStudio project with Git git config -global user.name 'yourGitHubUsername' Go to Tools > Shell to open the Git Shell to tell Git your username and GitHub email. User name and email needs to be set only once.
![downloading fork using github desktop downloading fork using github desktop](https://b.thumbs.redditmedia.com/SSP6t4MEjYaHatIhmY8jiLyWm6eef8QTCYZkLi6WQeM.jpg)
You can directly open the Git prompt from within RStudio. Setup Git: Configure Git and set your user name and email (the email address you used to register on GitHub).
![downloading fork using github desktop downloading fork using github desktop](https://robinagandhi.github.io/swa/pages/img/githubfork.png)
The path should be something like: /usr/bin/git Linux/OS X: type which git and hit enter. The path should be something like: C:/Program Files (x86)/Git/bin/git.exe Open a shell, if you don’t know where Git is installed.
![downloading fork using github desktop downloading fork using github desktop](https://assets.ccbp.in/frontend/content/react-js/editable-text-input-lg-editing-output.png)
Additionally you will also need a GitHub account. Installation: To get started you need the following software installed on your computer: Git and if you are new to R, then you also need to install R and RStudio. RStudio integrates support for git, hence we are going to use the widely used combination R + Git + RStudio. GitHub is a user-friendly webservice that allows you to store your project repository remotely. install.packages("devtools") devtools::install_github("username/packagename") (Development of R packages is more advanced in R, but is a well-structured way to keep your projects tidy see: R Packages by Hadley Wickham) And you can install development packages of others with two lines of code. In R it makes sharing of your packages easy.You can see what changes between different versions of your code, analysis or written text!.You can revert back to a previous version, if you find errors or accidently deleted something.You can also report errors (bugs) or suggest new additions (features) to projects. People can contribute to your project and vice-versa. It makes sharing of your projects easy (once it’s setup, you’ll get there).Git allows you to track and share your code and analysis. R in combination with the distributed version control system Git provides a convenient setup to make your research project reproducible. Clone/fork an existing project from GitHub.(The tutorial was originally created on GitHub and hosted here.) Approve the prompt stating that that application was downloaded from the internet.This tutorial in the context of the Reproducible Research Workshop provides you with the first steps on how to use Git with R and RStudio.Approve the dialog asking if you want to replace the existing application.Drag the GitHub Desktop application from your "Downloads" folder to the "Applications" folder.If the downloaded application is in a zip file, unpack the file by double clicking on the zip file.In your "Downloads" folder, locate the downloaded application.Download the latest version of GitHub Desktop.Your preferences and tracked repositories will be retained.
![downloading fork using github desktop downloading fork using github desktop](https://www.blog.hibbittsdesign.org/user/pages/01.posts/2016-04-04-using-github-desktop-and-gitlab-with-Grav/github-desktop-local-repository-added.png)
If you encounter a crash when attempting to launch GitHub Desktop versions 3.0.2 through 3.1.3, download the latest version from the GitHub Desktop site, then replace your existing application with the new version. Resolving a crash at launch by updating GitHub Desktop If an update is available, quit and relaunch GitHub Desktop to install the update. In the modal window, click Check for Updates. In the menu bar, select GitHub Desktop, then click About GitHub Desktop.