Skip to content

Latest commit

 

History

History
62 lines (34 loc) · 2.28 KB

install-git-on-mac.org

File metadata and controls

62 lines (34 loc) · 2.28 KB

Install git on a Mac (git from GitHub)

Prerequisites

First install Xcode if you don’t already have it (under Applications folder).

  1. In your browser go to https://developer.apple.com/xcode/downloads/
  2. Under “download Xcode for free” click “view in mac app store”.
  3. Sign in with your apple ID (yes, it assumes you have one).
  4. It should install in your Applications directory (takes several minutes; it’s 5.6 GB!).

Then open it up and agree to the license. (Requires admin privileges.)

Install Git

Now install git from github:

  1. Go to https://mac.github.com, and click the download button. In a few seconds it turned my download icon in the apps bar into the purple cat icon.
  2. Click on GitHub (cat) icon. It comes up with a setup screen.
  3. Click ‘continue’.
  4. Login to github (create a login at this point if you don’t have one already) and click continue.
  5. Provide email address.
  6. Do you want the command line tools? Yes, you do, so click: “Install command line tools” (requires mac login/admin pw)
  7. Click continue.
  8. It asks: “which repositories to use”. You don’t have any yet, so click “Done”.
  9. Then the github window comes up and says “find repositories”. Leave that for now and go back to browser.
  10. Go to https://github.com/DUNE.
  11. Choose the repository you want (e.g., line-fd-closeout).
  12. In bottom right, see button: Clone in Desktop. Click it.
  13. The GitHub app comes up with a popup to Clone it. Check if the target directory is ok, change it if you want, then click Clone. It’s there!
  14. Go to your terminal window. Navigate to your new repository, e.g., Documents/lbne-fd-closeout. You should find everything there.
  15. Do a “git pull” before you begin just in case anything has changed.
  16. See the popup that says you should install the command line developer tools. Do so. (Even if you thought you already had.)

Note, If you haven’t installed Xcode, you will get this error:

ERROR: “no developer tools were found at ‘/Applications/Xcode.app’, requesting install. Choose an option in the dialog to download the command line developer tools.”

Stop and install Xcode, if needed (see instructions above)

Try “git pull” again. Now you should have it all set up.