-
Notifications
You must be signed in to change notification settings - Fork 2
git setup
Getting started with git on Windows (2014-07-22, @skgoetz):
-
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.
-
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.
-
Type the following with your own email address and name (one
git configstatement per line, never mind the wiki page's misformatting):git config --global user.email [email protected]git config --global user.name "Your Name" -
Set up an rsa public/private key pair, again with your email address:
ssh-keygen -C "[email protected]" -t rsaAccept the default path; do enter a passphrase that you can remember well. -
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.pubIn 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 (fromssh-rsato your email address), then return to that upper-left menu and choose Edit > Copy. -
In a web browser, go to https://github.com/settings/profile (log in).
-
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".
-
Return to the git bash window. Use
cd directorynameto change directories to where you want the local repository to live on your computer, then executegit clone https://github.com/scottkleinman/aeme.git -
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