Git config user.email To check that Git has been properly configured, type the following: Git will use your name to keep track of the identity of the person who is making the changes to the files.ī) Type the following, replacing with the email associated with your Github account, and hit Enter: If all else fails, try going through the instructions of this guide again from the very beginning, making sure you do not skip any steps.Ī) Type the following, replacing Your Name with your actual name, and hit Enter: Check all of the assumptions at the top of the guide. If you followed the previous instructions correctly, your shell should be Git Bash. The RStudio project should be the one you created from a Github repository. If you have the wrong shell, check on the top right corner of your RStudio window to make sure that you are in the correct RStudio project. However, if your shell looks like the following, something is wrong. Your window and output should look something like this: Confirm that RStudio is using Git - The shell window name at the top should say something like 'MINGW64' or 'MYSYS.' To double check, you can type the following: Open Git Bash shell from RStudio - Tools > Shell.Ģ. Create a new project from your Github repository in RStudioĪ) In RStudio, go to File > New Project… > Version Control > Gitī) Paste your Github repo link into the Repository URL boxĬ) Optional: edit your Project directory name and select desired subdirectory for projectġ. Set RStudio to use Git Bash as shell - In RStudio, go to Tools > Global Options > Git/SVN > make sure boxes are checked for both “Enable version control interface for RStudio projects” and “Use git Bash as shell for Git projects”Ī) Log into Github and create a new repository.ī) Copy the URL of your repository from your browser’s address barĢ. If your computer does not have Git, go to to download the latest version. If the version description of git shows up in Terminal, you have Git installed on your computer already. Then type in 'git -version' again and hit enter. If prompted to install command line developer tools, install as prompted. Open Terminal and type 'git -version' and hit enter. To check in Mac, go to Applications > Utilities > Terminal. To check in Windows, go to your start menu and search for 'Git.' If an item called 'Git Bash' shows up, you are good to go. *Your computer should have Git already installed. *You should already have a Github account. *This guide assumes that user has basic knowledge of RStudio and Github. Not only will your code be accessible on Github, but every change will also be logged and various versions of the same file can be created so that you can easily view and incorporate changes made by collaborators or go back to a previous version if a mistake is made. Furthermore, linking your local Git to your Github account’s repository will allow you to access your R code and files from anywhere. Using RStudio with version control will make collaboration smoother by keeping track of changes in Git.
0 Comments
Leave a Reply. |