1 Installation
There are several implementations of the current version of Git for Windows, but we chose the Msysgit release, which is currently the best compatibility. Download Address: Http://code.google.com/p/msysgit/downloads/list
When the download is complete, double-click the installation file and follow the prompts to complete the installation of Git. Git installation process is very simple, after installation will prompt you to do preliminary configuration work, here we all according to the default value can (PS: I chose Git bash when I selected the Unix-like prompt interface), after installation git bash launch interface as follows:
2 Creating an account
GitHub is a kind of SF-free project management and sharing service platform, in order to use the services provided by GitHub, you must first register as GitHub registered users. GitHub's web site is: http://github.com 3 Build a local git repository
Create a directory git_repository under D-Disk (all subsequent items can be centrally placed in git_repository), and you can do so by executing the following command in Git bash:
4 generate SSH key
Execute the following command in Git bash:
1 |
Ssh-keygen-c ' XX@gmail.com '-t RSA |
Press the ENTER key all the way, of course, if you want to choose to use the password function, then the prompt to enter the password is to choose your own password. The procedure is shown in the following illustration:
Note: The mailboxes in Ssh-keygen use GitHub to register users.
Landing GitHub System. Click the edit your profile in the upper-right corner---> account Settings--->ssh the public keys---> add another the public keys to copy your locally generated key to the inside (key In this box), click Add Key to OK.
Test the success of the connection, execute the following command in Git bash:
Prompts for the following information to indicate successful connection:
5 Creating a project 5.1 Back to GitHub homepage, click the lower right corner of the page "New Repository" fill in the project information:
Project:hello-world
Description:my Project
Click "Create Repository"; now complete the creation of a project on GitHub.
5.2 Use Git to create an identical project locally
1 |
$ makdir ~/hello-world//Create a project Hello-world |
2 |
$ CD ~/hello-world//Open this project |