Search code examples
rgitgitlabrstudio

How to see the 'http' adress of Git repository in use from RStudio?


I have started to use version control in RStudio using GitLab, but now I wish to use GitHub instead. So, I need to move all of my repositories from GitLab to GitHub, as specified e.g. here.

But, for some time, I was using both GitHub and GitLab simulteneously, and developing single project on both repos individually! Quite stupid, but it happens..

Shortly, now I need know, which repo (GitHub or GitLab) is my R studio using? I am looking for some code that will print out the http of the repository in use?

something like repo.print and will return the http associated: https://gitlab.com/xx/yy/z or https://github.com/xx/yy/z.


Solution

  • git config --get remote.origin.url in Terminal or

    shell("git config --get remote.origin.url")
    

    in R console / script.