This article briefly introduces how to connect to git @ osc through the git client under xp. 1. download the latest git client from google code. Start git bash after installation. 2. Switch the cd directory to the custom path. I will create a git directory on drive F. 3. log on to the open-source China git @ osc and register an account without it. The process of creating a new project is no longer mentioned. 4. There are two connection methods after the project is created. Use http first. In Your bash shell, you cannot enter Chinese characters by typing the current bash shell. You can use the insert key to paste information. Git clone "http url"
Clone an empty project to a local device. During this period, you must enter the user name and password, which is the email address and password for registration. You can see the downloaded file. If the update is completed. Cd to the download directory. You can use git remote-v to view the remote server address. Git status to view the File status. Red indicates a new file, which is not hosted by git. Git add test.txt or git add. Indicates adding files. "." Indicates adding all files in the current directory. Re-use gitstatus to view the File status. The new file is programmed in green. Indicates that it has been managed by git. Git commit: Submit the file. In git commit-m "comment" git push origin master origin indicates the branch name of the server, and master indicates the name of the local branch. If no special execution is performed, this is the case by default. You can use git branch to view the local branch name.
If git branch is submitted via ssh, set the public key first. The method is as follows: 1. Execute ssh-keygen-t rsa-C "email@email.com" in shell ". Give your file a name, id_rsa2, press enter, enter password 3, and then you can see the following two files in the upper-level directory. Copy them to the C: \ Documents ents and Settings \ Administrator \. ssh \ directory. 4. Find your personal settings in git @ osc --> set the ssh public key and add the public key. Open id_ras.pub, copy and save all the content. 5. git clone "ssh url" is the same as above.