Things I Forget: Push/Pull Greyed out in RStudio?!?
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.
So, on more than one occasion I have set up a repository locally, then on GitHub and pushed to that repo from the shell. This works great, but this would always result in the Push and Pull buttons in RStudio getting greyed out. I could push just fine from the shell, but not from the GUI. Not a big problem, but always kind of annoyed me.
Today I took a bit of time to search for a solution and found my answer pretty quickly over on RStudio support. All I had to do was simply push from the shell with the -u
flag. This flag added an upstream reference.
Prior to fixing it my config looked like:
user.name=Jeff Hollister
[email protected]
core.repositoryformatversion=0
core.filemode=false
core.bare=false
core.logallrefupdates=true
core.symlinks=false
core.ignorecase=true
core.hidedotfiles=dotGitOnly
remote.origin.url=https://github.com/jhollist/hkm.git
remote.origin.fetch=+refs/heads/*:refs/remotes/origin/*
And after using git push -u origin master
, my config had these two lines added at the bottom:
branch.master.remote=origin
branch.master.merge=refs/heads/master
I restarted RStudio and can now push and pull from the GUI. Yeah!
Lastly, this really isn’t something I have forgotten yet, I just looked it up. But, it does seem like something I would forget. I am just being proactive here.
Filed under: Programming, R, Things I Forget Tagged: Git, pull, push, RStudio
R-bloggers.com offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job.
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.