CAT | Programming
20
Git, GitHub, TortoiseGit, Windows 7, Windows Vista, msysgit
2 Comments | Posted by Ian Sweeney in Programming
I wasted a lot of today setting up TortoiseGit on two PCs, one running Vista and the other running Windows 7, to work with my private Git repository at GitHub.
Here’s what finally worked:
1) I downloaded msysgit (Git-1.7.0.2-preview20100309.exe) from http://code.google.com/p/msysgit/downloads/list
2) I installed the software and unchecked the option for Windows integration. I’ll be using TortoiseGit for the Windows integration and don’t want any conflicts from msysgit.
3) Selected the option for Git Bash only. Other options make unnecessary changes to windows environment.
4) Selected the option to Checkout Windows style, commit Unix style line-endings.
5) Accepted all other default settings. That’s all that is needed for msysgit, the Git for Windows software.
6) I downloaded TortoiseGit (TortoiseGit-1.5.2.0-32bit.msi) from http://code.google.com/p/tortoisegit/downloads/list
7) I installed the software and selected TortoisePLink and not OpenSSH. N.B. Since TortoiseGit 1.5.2.0 bundles TortoisePLink there is no need to download or install PuTTY separately as many web pages instruct. This was probably a necessary step for previous versions of TortoiseGit.
Accepted all other default settings. At completion of setup rebooted windows.
9) Ran PuttyGen, which is installed with TortoiseGit.
10) Clicked on Generate, moved mouse around in random pattern and saved both private and public SSH keys. Before saving you could enter a key passphrase. This is not necessary but is the optimal security option. I saved the private key as C:/users/UserName/.ssh/id_rsa and the public key as C:/users/UserName/.ssh/id_rsa .pub which is consistent with how msysgit stores SSH keys.
11) Logged into GitHub and set the public key for my private repository to be the same as the public key generated by PuttyGen.
12) Started Windows Explorer and created a new folder/directory. Right click on that folder.
13) Left click on Git Create Repository here
14) Again right click on the created folder. Left click on TortoiseGit | Settings
15) Click on Git | Config and ensure email address match the email address setup in GitHub
16) Click on Git | Remote
17) Enter GitHib repository name in field Remote. e.g. If repository name is REPO then enter REPO. For next step I’m assuming a GitHub username of fred
18) git@github.com:fred/REPO.git (Replace fred and REPO as appropriate. Do not prefix URL with protocol – no http:// or ssh:// or https:// or git://)
19) For the PuTTY key field browse to the private key file that was earlier saved in PuttyGen.
20) Save changes. Hold down shift key and right click on folder. Left click on TortoiseGit | Pull.
21) Remote should be set to REPO (replace with your repository name).
22) Remote branch should be set to master (or the branch name you want to pull from GitHub). Ensure AutoLoad Putty Key is checked. Click OK and be genuinely surprised at how amazingly fast Git is now that we’ve done the hard work to get it set up. Pageant is also part of the TortoiseGit bundle. There is no need to start it manually. TortoiseGit starts it when necessary.
I managed to install Doctrine using the svn:externals technique in Eclipse/Subclipse (SVN).
Is Git better than Subversion?
