eco-data-science / github-intro

Intro to GitHub Workshop
5 stars 16 forks source link

Update OS and Git disappeared #1

Open jamiecmontgomery opened 9 years ago

jamiecmontgomery commented 9 years ago

From @DanOvando and I think @jules32 just had the same issue as well. Leaving here for future reference

Random Git note for Mac users. I turned on my computer Friday to find to my pleasant surprise that Git had disappeared from my computer! Turns out that updating your OS and command line tools/XCode to the newest versions removes (or at least hides) Git.

Easy fix. Go to

https://git-scm.com/downloads

download and unpack the image. Run the "git-2.5.3-intel...pgk" to reinstall git. Then, run the "setup git PATH for non-terminal programs.sh" program, and git will be right back where it was before and you can stop panicking: everything will be exactly what it was before, including past commits and changes.

image

DanOvando commented 8 years ago

Thanks @jafflerbach! Quick note, this happened to me again after updating command line tools in OSX. This time, the fix is to install the package, then open terminal and type

sudo mv /usr/bin/git /usr/bin/git-system

to remove "stubs", whatever the hell those are. The instructions are in the README.txt that comes with the new git install package

DanOvando commented 8 years ago

And another issue! I bit the bullet and moved to El Capitan. This promptly caused RStudio to forget where git lives. The above fix doesn't work, so instead

  1. Open terminal, type which git
  2. Note the path that produces, that tells you where Git lives on your computer
  3. Go into RStudio/Preferences/Git/SVN
  4. Look at the path of the Git executable. It should be the same as step 2
  5. If not, hit browse, and go to the path from step 2, and set that as the location
  6. apply and restart Rstudio
jamiecmontgomery commented 8 years ago

Thanks @DanOvando

This later issue is what was causing @traceybit and @heathden issues during the git-intro session!