Step 5: up and runningĪll you need to do now is remember to commit changes and push them to the GitHub repo. This will send all changes to the GitHub repo. Select all the files you would like to track, write a commit message, then click push.
This will open a window where you can stage files to be tracked (and synced on GitHub). # set up GitHub repo to track changes on local machineĬlick the Git tab in Rstudio, and then click Commit. # pull all files from the GitHub repo (typically just readme, license, gitignore) # initiate the upstream tracking of the project on the GitHub repo Open a terminal and do the following: # move to the project directory It will ask you to initialize a new git repo and restart RstudioĪfter Rstudio reopens, confirm that there is a Git tab in the environment pane (which for me, and I think by default, is in the upper right of the IDE) Open your project in Rstudio and navigate to Tools -> Version Control -> Project SetupĬlick SVN/Git tab and select git as the version control system. gitignore, readme.md, or license.md files, but add them myself manually after the project is up and running. Go to your github account and click the button to create a new repo. This is loosely based on the combination of this and this tutorial. Perhaps I’ll add a command line version later. I’m sure there are better ways of doing this in the command line, but I’m still pretty new to Git so I’m sticking with what I know works. This post is mostly just a way for me to remember how to get an existing R project on GitHub. That’s when I know it’s time to get it up on GitHub. Many of the R projects I start don’t pan out and end up in a scrap directory somewhere, but once in awhile I make enough progress to get worried that I’ll lose track of it.