原文

his is a guide for all the Windows users (not me) out there.
It will explain how to work with a github repository under windows using TortoiseGit.
 
Let's get started. At this point you should be a collaborator or owner of a github repository.
Download TortoiseGit.
Install it like any other program. There are no special settings, just keep on clicking 'next'.
 
Now download msysgit.
During this installation you have to set some important settings. Please be sure that you set them correctly.
 

windows 下使用github

Adjust the PATH environment
 

windows 下使用github

Choose the SSH executable
 

windows 下使用github

Choose line endings
 

After the successful installation of both programs continue with the generation of private and public SSH-key. To do this you have to start 'PuTTY Key Generator' - find it in Start - Programs - TortoiseGit

windows 下使用github

Just click 'Generate' and move the mouse
 

After it's done you see your freshly generated ssh public key. You can define a passphrase at this step, but it isn't required.

windows 下使用github

Save the public AND private key for later usage.
 

You can copy the key out of the box and add it to your github account.

windows 下使用github

 
Now your ready to create a local repository. Create an empty folder and right-click into it.
Choose 'Git Create repository here'.

windows 下使用github

 

windows 下使用github

Now go to the repository settings...
 

windows 下使用github

... and set your full name and email that your using at github.
 

windows 下使用github

Here you click 'Add New' and paste the github 'Your Clone URL' into the url field.
Select the putty private key we created before, too.
 
Now we're ready to pull for the first time.
Select 'Pull' from the TortoiseGit menu.

windows 下使用github

For 'remote' select the 'origin' we added before.
Be sure that 'AutoLoad Putty Key' is checked and for 'Remote Branch' master' is selected (type it if you can select it).
 

Now click ok and we're done. You should have all the repository files now if you did everything correct.

相关文章:

  • 2022-01-04
  • 2021-09-04
  • 2022-01-07
  • 2021-10-31
  • 2022-12-23
  • 2021-06-10
  • 2021-04-07
猜你喜欢
  • 2021-04-20
  • 2021-10-09
  • 2021-08-13
  • 2021-11-23
  • 2021-04-20
  • 2021-12-03
相关资源
相似解决方案