
# 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. # E> namespace 'rlang' 0.4.10 is being loaded, but >= 0. # E> Error in loadNamespace(i, c(lib.loc. # E> ** byte-compile and prepare package for lazy loading # System command 'Rcmd.exe' failed, exit status: 1, stdout + stderr (last # 10 lines): # Error: Failed to install 'pkgdown' from GitHub: Is it the reason? I've tried to install but there're errors showed below: # Install development version from GitHubĭevtools::install_github("hadley/pkgdown") However, I was unable to install the development version for GitHub. I have installed the pkgdown package using this command: install.packages("pkgdown") So now I cannot push my website on GitHub.Ĭan someone help me spot out what's wrong? And how to fix this? And I need to push this docs\ subfolder to my Git repo, but I don't know why the docs\ subfolder does not show on my Git commit panel.

You can see in the photo below (red arrow). The function pkgdown::build_site has generated a subfolder docs\ in my local repo. I ran the following codes: # Run once to configure package to use pkgdown I used the pkgdown package to create a new website of my package that will be hosted on Github.
