Skip to content

git setup

skgoetz edited this page Jul 22, 2014 · 3 revisions

Getting started with git on Windows (2014-07-22, @skgoetz):

  1. Download and install the msysgit package at http://msysgit.github.io/ Accept the defaults during the installation process: in general, don't modify system settings (PATH, etc.) unless you are sure.

  2. Right-click in a Windows Explorer window and choose "Git Bash". Note that Explorer won't work well while the git bash window is open.

  3. Type the following with your own email address and name (one git config statement per line, never mind the wiki page's misformatting): git config --global user.email [email protected] git config --global user.name "Your Name"

  4. Set up an rsa public/private key pair, again with your email address: ssh-keygen -C "[email protected]" -t rsa Accept the default path; do enter a passphrase that you can remember well.

  5. Get the content of the public key, correcting the example path below to match your device's setup (check c:\Users in Explorer if you aren't sure what NAME should be): cat /c/Users/NAME/.ssh/id_rsa.pub In the upper left corner of the window is a little blue-green and white icon. Left-click on it once, then choose Edit > Mark. Highlight the entire public key (from ssh-rsa to your email address), then return to that upper-left menu and choose Edit > Copy.

  6. In a web browser, go to https://github.com/settings/profile (log in).

  7. Choose "SSH keys" from the left-hand menu, then "Add SSH key". Enter something descriptive as the title (e.g. "laptop 20140312") and paste the rsa public key into the key field, then choose "Add key".

  8. Return to the git bash window. Use cd directoryname to change directories to where you want the local repository to live on your computer, then execute git clone https://github.com/scottkleinman/aeme.git

  9. If you need a similar setup on more than one device, repeat from at least step 4: an rsa key is needed for each device, one way or another.

A reference document with screen shots from 2009: http://nathanj.github.io/gitguide/tour.html

Next: basic commands

Clone this wiki locally