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
.
CodePudding user response:
git config --get remote.origin.url
in Terminal or
shell("git config --get remote.origin.url")
in R console / script.