What They Forgot to Teach You (2018-01) ... system setup

The main pre-workshop setup for the "What They Forgot to Teach You About R" workshop relates to Git/GitHub and RStudio.

This truly requires your attention before you show up at 9am on Wednesday January 31. I want to show you how to use Git/GitHub in your life as an R-using data analyst, which means we can't afford to get bogged down in a hot mess of Git installation issues. Let's try to work through them beforehand.

Start here: http://happygitwithr.com/workshops.html#pre-workshop-set-up

This is the thread to use if you get stuck. If we see recurring problems, I might move it over to a GitHub issue on the Happy Git repo.

If you wonder why I've chosen to include Git/GitHub in this workshop, you might want to read Excuse me, do you have a moment to talk about version control?.

Go forth and install Git! :boom:

Hi Jenny.

First, pleasure to meet you!

My issue: When I open the shell via RStudio (Tools --> Shell, or Tools --> Terminal --> New Terminal), I do not get MSYS or MINGW64 in the status bar. I get:

Eric.Krantz@rsirco-tbkrantz  ~/Git

I am working through Git setup using your Happy Git. I have Windows 7 Pro, and have updated RStudio, R, and installed Git for Windows. Git is at C:\Program Files\Git\. My terminal client in RStudio Global Options is "Git Bash".

RStudio opens with:
R version 3.4.3 (2017-11-30) -- "Kite-Eating Tree"
Copyright (C) 2017 The R Foundation for Statistical Computing
Platform: x86_64-w64-mingw32/x64 (64-bit)

which git returns /cmd/git even though RStudio --> Tools --> Global Options --> Git/SVN --> Git Executable is set to C:/Program Files/Git/bin/git.exe

So I checked my Git source directories, and noticed that git.exe is under both /cmd and /bin. If I run C:\Program Files\Git\bin\bash.exe from outside RStudio, I get MINGW64 in the status bar.

Is my issue really a problem? I want to make sure I have everything squared away before the workshop! Thanks,

Eric

Yeah you won't see that if you get into a shell via Tools > Terminal > New Terminal. However, in my Windows 10 VM, if I launch an external shell via Tools > Shell, I do see MSYS up there. Can you double check what you are reporting?

This section of Happy Git:

also offers a code snippet you can execute in each Windows shell to gain extra confidence re: which one you are in. Maybe try those too?

I also see /cmd/git when I execute which git in a shell launched inside RStudio via Tools > Terminal > New Terminal or launched outside via Tools > Shell. So that looks fine.

In conclusion, I think everything suggests you have a successful installation of Git Bash.

The real proof would be do some of the early "smoke test" workflows:

Glad you've done this! It looks like you are on track.

Hi Jenny - I am really excited for this. One question: I have been using Git for years in the terminal, and am most comfortable with that. Is this the time for me to exit my comfort zone and start using Git with RStudio? Or is Git more of an ancillary part of the course? Thanks!! Daniel

I am completely agnostic re: how you use Git. I'll show as much as I can using RStudio, simply because I think it's more approachable than the command line. But there's no reason for you to change what you're doing. I think you can frame that content as something for you to consider when onboarding new people to Git.

1 Like

When I Tools > Shell, this happens (NOTE: echo $SHELL at the bottom):

    370 [main] bash 6348 fork: child 6904 - died waiting for dll loading, errno 11
bash: fork: retry: Resource temporarily unavailable
1029349 [main] bash 6348 fork: child 8932 - died waiting for dll loading, errno 11
bash: fork: retry: Resource temporarily unavailable
3082030 [main] bash 6348 fork: child 1872 - died waiting for dll loading, errno 11
bash: fork: retry: Resource temporarily unavailable
7104876 [main] bash 6348 fork: child 3212 - died waiting for dll loading, errno 11
bash: fork: retry: Resource temporarily unavailable
15131730 [main] bash 6348 fork: child 4748 - died waiting for dll loading, errno 11
bash: fork: Resource temporarily unavailable
bash-4.4$ echo $SHELL
/usr/bin/bash
bash-4.4$

Here is a thread discussing this error (I do not have PowerBroker installed, but this IS a corporate machine with corporate antivirus installed). https://www.bountysource.com/issues/34992371-launching-git-bash-gives-bash-fork-retry-error

I was able to fully work through "Connect to Github" & "Connect RStudio to Github" chapters and everything worked great!

I generated an SSH key. However, when I tried to check the SSH agent from the shell, I get this:

Eric.Krantz@rsirco-tbkrantz  ~/Git/tmp/myrepo (master)
$  eval $(ssh-agent -s)
      0 [main] ssh-agent 6392 fork: child 5992 - died waiting for dll loading, errno 11
fork: Resource temporarily unavailable

I was able to work through "Connect RStudio to Git and Github", "Detect Git from RStudio", and "New Project, Github First", so I think the error message isn't a huge issue(??)

If I understand you, you are able to work in Git Bash shell via Tools > Terminal > New Terminal (and not via Tools > Shell so YAY terminal).

You can successfully communicate with GitHub for push and pull.

You are having trouble with the ssh-agent. So you can either get through the workshop entering your username and password a lot. Or, my recommendation, is to connect to GitHub via HTTPS and go through the set up here to get your system to cache your credentials:

But it sounds like you are already in a functional state, so that's good.

I learned what I could of git in the terminal too. As I prepped for this though I tried a git client (git kraken) and am so impressed. I find I'm much more likely to keep git in the mix when using it. I don't think it handles anything beyond the simplest rebase though, especially if you want to squash commits. Overall though I wish I'd thought of trying it when I was learning!

I've used SourceTree (also a Git client, like GitKraken) for years and feel same as @adamk re: making fewer mistakes and using more advanced technique with less headache. Not sure about GitKraken, but SourceTree is great for re-writing history (editing commit messages, reordering commits, squashing, etc.) and various types of rebase. The main reason I go to the command line in my normal Git life is to check out specific paths from a specific ref. I don't think SourceTree does that.

For general readers: don't worry if the above does not make sense, but do consider the advice to install a great full-blown Git client, such as SourceTree or GitKraken. There's a section of Happy Git about this:

Will there be any issue using VPN to remote into my work computer during the workshop? Just checking to see if I need to set up everything on my personal computer or if I'll be able to remote in.

I don't have any specific info on that, I'm afraid. I assume it is likely to work.