Use git and githubgithub on Windows
Git is an open-source, fully distributed source code management system. It is very popular in the open-source community and has become a trend to replace subversion in the open-source community.
Install and configure msysgit
It is assumed that you are using a Windows operating system, although git may be more convenient to use on Linux or MAC systems. Currently, msysgit is easy to use on winodws. You can download it from Google Code: http://code.google.com/p/msysgit /. The latest version is 1.7.0.2. Although it is preview, it is basically stable. The installation process is very simple. It is good to follow the next step. Msysgit includes a command line tool and a GUI program. GUI is not yet a mature product, but you can try it if you don't want to use command line.
Generate an SSH key
Before using git, You need to generate an SSH key to ensure the communication security between your local box and the server and identify code changes. Select a folder, right-click, select "Git Bash here", and enter the following in the command line window:
Ssh-keygen-C "username@email.com"-T RSA
The email address used here is the e-mail address you used when registering git. Here, you can enter the passphrase in the middle, which is a password or a pass code. You can edit it or press enter directly. If it is null, you will be prompted. The generated RSA file storage location is displayed in the window. If it is on the XP system, the location should be "C: \ Documents ents and Settings \ USERNAME \. SSH \ "; if it is on win7, the location should be" c: \ Users \ USERNAME \. ssh ".
Register git account
The registration process is similar. The only difference is that you need to enter an "ssh public key ". In this case, the generated RSA key file is used. Use NotePad to open id_rsa.pub. The file content is your public SSH key. Copy & past. Registration is complete.
Start git tour
Use "Git Bash here" in the source code folder and enter your git name and email address.
Git config -- global user. Email username@email.com
Git config -- global user. Name "username"
Initialize the folder:
Git init
Add File
Git add.
Submitted Server
Git commit-M 'start Project'
Git remote add origin git@github.com: username/Project. Git
Git push origin master
Project. Git is the name of the project you created on GitHub.
Appears
The authenticity of host' GitHub. COM (207.97.227.239) 'Can't be established. RSA key fingerprint is 16: 27: AC: A5: 76: 28: 2D: 36: 63: 1b: 56: 4d: EB: DF: A6: 48. are you sure you want to continue connecting (Yes/No )?
Normally, press Yes and press Enter.
HiUsername! You 've successfully authenticated, but GitHub does not provide shell access.
Succeeded