TortoiseGit is easy to install. The key is to use SSH to connect to Github. It is more troublesome to produce keys. I found some information on the Internet, such as generating keys through command lines. Later, we saw that Github had an https method, which solved the connection problem, but every push and pull had to fill in the GitHub account and password for verification.
Don't give up, google a few times, change the keyword several times, finally find a reliable point, turn it by hand, do not repeat the work, directly borrow the results. The following is the text.
I have installed GIT for a long time and have no time to drum up recently. I am not very familiar with it when I submit GitHub today. So I checked the information and kept a simple record on how to install and use git.
1. msysgit
TortoiseGit depends on msysgit, download: http://code.google.com/p/msysgit/downloads/list
I use Portable. Similar to decompressing .7z to: D: \ WebDevelopment \ Git \ PortableGit
2. Configure TortoiseGit
Download: http://code.google.com/p/tortoisegit/downloads/list
Install TortoiseGit, and keep it all by default.
Configure the git path:
Right-click TortoiseGit-setting-General-MSysGit on the desktop, and specify:
D: \ WebDevelopment \ Git \ PortableGit \ bin.
Create an ssh key:
Start menu-TortoiseGit-Puttygen, Generate, and Save the private key to the local device (key passphrase is not required). For example, Save it to: D: \ WebDevelopment \ Git. The saved key can be used again next time, for example, reinstalling the system. The ssh key generated in the copy dialog box is similar:
Ssh-rsa
.....
.....
..... = Rsa-key-20120218
TortoiseGit-setting-Git-Config, and enter name and email.
3. Use GitHub
GitHub features similar to googlecode to facilitate code storage. On the homepage, go to Edit Your Profile and find the SSH Keys, Add New SSH Key, or edit existing SSH Key. Take the title as needed and paste the ssh key copied above into the key column.
Create a Putty project:
Home page, New repository to create a project, fill in the project name and so on. After the creation, you can see some instructions, find the git@github.com inside: yourName/test. git, copy this URL.
Create local folders, such as test, right-click-Git Clone, and paste the copied URL in the URL. Load Putty Key: Select the ssh key that is saved to the local machine. OK.
Submit code to github
Right-click Git Commit and then Push it to GitHub.
Others:
Fetch: download code from repository.
Pull: fetch the repository code and merge to the current branch (equivalent to: fetch + merge ).
Clean up: delete files without Version control
Add: add to version Library
Create branch: create a branch
Switch/checkout: switch branch
Show log: View Branch and modification records
Reinstalling the system to continue using the key
Puttygen, Actions-Load, found: ssh-rsa_key.ppk
Locate the previously created GIT project, and then Pull may see errors, such as git did not exit cleanly (exit code 128.
When pushing, you should see more detailed errors, such as: Github prompt: Please audit your SSH keys, and return a URL.
Open the URL, select Reject/Approve, and select Approve. Now you can continue Pull/Push.