How to install GIT under Windows for ZF

Hy interested ones,

actually I was changing my complete development environment to a new computer and switched from SVN to GIT.
Well… never change a running system.

I was very unhappy of GIT integration under Windows. Also the actual documentation is not really understandable.
So I thought that I write you a HowTo for ZF under Windows.

You are using Windows?
You want to contribute to ZF?

If the above assumtion fits to you, you should read further.

1.) Install GIT locally
Download “msysgit” (I used the latest full installer) and install it. You can find it under [http][\http].

At installation use the second option when you are asked for the command line option.

You can find it under [http][\http].

3.) Create an account at GITHUB... [[\http].
It should use the email you are also using for your contributions (which you have told Zend for your CLA)

4.) Create an SSH key to use for contribution…
Open GitBash (which was installed with GIT).

ssh-keygen -t rsa -C ""

But change “” with the email address you have told when you requested your CLA at Zend.
Press “Enter”
Now give a passphrase… but you should remember it. Otherwise you would have to recreate your SSH key from time to time.

5.) Copy your public key into the pastebin
Within Step 4 you will see the exact path and file where your SSH key is stored.

6.) Add the public key to your Github account
Open your GitHub account and go to “Account Settings” and within there to “SSH Public keys”.
Press the “Add another public key” button”.
Leave the title blank and paste your key file into the key textfield.
Press “Add key”.

Now you’ve added a key to your github account and should be able to commit to your github account.

7.) Fork ZF with your own Github repository
Go to the ZF projects page within github… [http][\http]
Press the “Fork” Button (you can find it in the upper right side).

8.) Configure TortoiseGIT
Open it by right clicking within your explorer
Go to “TortoiseGit” -> “Git” -> “Config”
“Name” should be your Git username
“Email” should be the email you registered within Github and which should also be equal to your CLA email.

9.) Add remote connections
Go to “Git” -> “Remote”
Add a new connection
“Remote” should be “origin”
“URL” should be “” where username is again your github username

Add a second remote conection
“Remote” should be “zf2”
“URL” should be “git://”

10.) Clone your fork locally
Open your Explorer
Go to the directory under which you want to have your repository.
-> Right click
-> GitClone
-> URL = “”
should be your git username
-> Repository = The new directory where you want to have your repository locally
Click OK

Now you’re ready to go…
But before working on an issue you should update your repository… do the following:
Update your local repository by
-> Right click on it within your explorer
-> Git-Sync
-> Local branch = “master”
-> Remote branch = “remote/zf2/master”… click on the “…” button and select the base ZF2 repository and the master branch
-> Pull … click the Pull button

All you need now is the “Git-Sync” command.
It enables you to create a new branch locally, on github, delete it locally or remote, pull, push and so on.

And now go and help on ZF :-)

Thomas Weidner
I18N Team Leader, Zend Framework

Zend Framework Advisory Board Member
Zend Certified Engineer for Zend Framework

Back to top
  1. Haruka

    Friday, November 5, 2010 - 19:22:29

    I guess, the main question is not how to set up git, but how to constribute to zf2 as a zf-constributor-newbe.

    For zf1 we can fix jira-issues. But what we can do for zf2?