Install from local git repository located in a file system directory

Is it possible to use devtools::install_git() to install a package from a local git repository located in some file system directory on MS Windows?

The examples only demonstrate how to install from a web URL (e.g. install_git("git://")).

  • Start new R package development on github
  • Is Git ready to be recommended to my boss?
  • Install error when install R package from github
  • Pre-commit hook for devtools::document
  • devtools::install_git Over SSH
  • r sourcing private repos from github
  • From within a package loaded via RStudio and devtools (CTRL + SHFT + L) and under git version control (i.e., subdirectory .git exists) , I tried the following:

    devtools::install_git(paste0("git://", getwd(), ".git"))

    The function came back with this error:

    Downloading git repo git://C:/Users/Thyson/Documents/path/to/package/packagename.git
    Error in git2r::clone(x$url, bundle, progress = FALSE) : 
      Error in 'git2r_clone': Malformed URL 'git://C:/Users/Thyson/Documents/path/to/package/packagename.git'

    So I’m guessing I just got the file system URL wrong?

  • Can I merge/sync a sub-folder from one branch to the root of another in git?
  • How to stop git via ssh on windows from resolving the wrong path?
  • Granularity for creating VCS-Repositories
  • Used git reset --hard, now wants to undo it
  • Can a merge change the commits history of a branch?
  • If some one knows my Github username and email, can they commit or push the files of my project?
  • One Solution collect form web for “Install from local git repository located in a file system directory”

    Why using devtools::install_git? You can use devtools::install instead.

    Git Baby is a git and github fan, let's start git clone.