Search code examples
rgitrstudio

RStudio gives "Incorrect function" when setting git as Version control


When I create a new project and select to create a new Git repository, or when I try to change the version control system in project options I receive a RStudio error stating "Incorrect function" with a big X and no extra information.

The below link has a similar issue, but their solution of changing the path for git.exe has not helped (i have tried all three paths)

https://support.rstudio.com/hc/en-us/community/posts/200632528-Git-Error-Incorrect-Function

Some extra notes:

  • RStudio allows me to clone repository to set new working directory
  • Also git works in bash, so i feel this is an RStudio issue.

Solution

  • I encountered the same error. For me it also had to do with using a network path not a local directory for the project location (as for lewis1211).

    Workaround: Map the network drive. E.g. Map your //server/share to some drive, say Z: (using map network drive, if you are using windows). If you set your project up under Z: then, it works.