0

I'm trying to link R Studio to GitHub. In my global options, the git executable is set up to the correct git/bin folder. I've already added the github URL using these instructions. I was able to modify the readme and that commit went through just fine. I'm now trying to commit an rmd and it just won't go through. When I click the git tab, the rmd shows up, I write a commit message, and then click commit and it says it went through, but it never shows up.

I found these instructions and so I'm checking the origin master to see if everything is set up properly. Here's what I get:

enter image description here

The https for git is correct here, as is the folder it's pulling from. I'm not a programmer generally (I'm a data analyst), so I don't know the ins and outs of this stuff. I've been hammering away at this for a few hours now and I'm just getting increasingly frustrated. Since I'm not a programmer, I'm really not clear on what's not working and why. Can anyone help?

r2evans
  • 141,215
  • 6
  • 77
  • 149
Litmon
  • 247
  • 3
  • 18
  • 3
    Did you try doing what the hints say? "Fetch origin" then pull/reset? – NelsonGon Oct 07 '19 at 15:38
  • Probably related: https://stackoverflow.com/q/37937984 or https://stackoverflow.com/q/45272492. I argue that this has nothing to do with R, especially since your screen shots are from `cmd.exe`, not the RStudio IDE. (The only way that this could be related to R would be if it works fine on the command line but not from RStudio. And even then it's about the IDE, not the language.) – r2evans Oct 07 '19 at 16:17
  • Since the OP's answer doesn't really explain anything, I'm voting to close a "resolved in a manner unlikely to help future readers. – ivan_pozdeev Oct 07 '19 at 23:11

1 Answers1

0

The following command should solve your problem.

git pull origin master --allow-unrelated-histories
Sathish
  • 16
  • 2
  • I've tried that and it says that it did a "fetch_head" and that it's already up to date. I tried committing it again through the git window and it still doesn't appear on the github side. – Litmon Oct 07 '19 at 19:00
  • Try to check the remote name you're trying to sync your local copy. `git remote -v` – Sathish Oct 08 '19 at 02:32