phpBB – Git – Windows Vista setup

First thing, this is on Windows Vista only. I have not tested on others but have been told it works on XP also.
WARNING: I will not be responsible for anything happening or going wrong with your PC because of these instructions.

Using these instructions you will be able to set up a local working copy of phpBB’s development repositories.
You will also have some new commands for command line and Git installed on your Vista PC.

If you don’t have a localhost setup, there is no point in going any further as this is for development only…
Here is the link for setting up localhost on Windows Vista Vista Local Host Setup, Tutorial on StarTrekGuide

1. The first thing you do is set a restore point in your Windows System so you can clock it back if you have to.

2. You will need to download some packages. These must be installed in the order I have listed.
Download the latest of both.

3. Installing msysgit Install this first!
The important settings on the install are as follows

For the image above,
Git-Cheetah no clue, it’s a new feature, the selection that I have there installs Git Bash, GUI, and cheetah
They are not needed for our setup because we will use a better solution tortoisegit, but they are optional and may have uses.
You may not want those extra options in the context menu to save room. As you see a few images down it can get quite long and as I said they are not needed.

The image above is an important one.
I suggest you select the one I have selected with the warning. Those couple Windows commands that you didn’t even know were there will get replaced with commands we need.
Like generating SSH Keys and using Git right from command line and you will need this!

Putty didn’t want to work for the keys needed and I got sick of fighting, this is the best solution.

Also msysgit Git Bash connects a lot slower to the server compared to good old Command Line at least for me it does…

For this image above, that setting should be fine…

4. Installing tortoisegit

The above image is very important.
That is the setting you want.
The rest of the install is obvious.

After the install you should have some tools that look like this in your right context menu.
Well my tools show all because it was over a local git repo, you will only see a couple options until you have a clone of a Git Repository

5. Setting up a copy of the phpBB git repo.

  • Setup an account on GitHub
    You will need an SSH key pair to work with this repository.
    Since we added the Unix tools to our command line this is easy.
  • Getting ready to create Keys
    Go to your C: drive or what ever drive your Windows is installed in.
    For me it would be C:\Then go to C:\users\ and locate your personal folder, eg. C:\users\jeff
    Hover over that folder press Ctrl + Shift keys and right click all at the same time.
    This will force an Open command line here in the context menu.

    In this command window type

    Then Enter and close the command line.
    You can only do this via command because windows will not allow you to create a folder named .ssh with the UI

  • Creating the Keys
    Now go into your user folder, find the .ssh folder you just created and again over this folder…
    Hover over that folder press Ctrl + Shift keys and right click all at the same time.
    This will force an Open command line here in the context menu.
    Now we are going to make the Keys, you have 2 options rsa and dsa but I am going to suggest using dsa to reserve rsa for elsewhere like assembla.In this command line window you should be at a prompt similar to C:\Users\jeff\.ssh
    At this prompt type

    then hit enter
    You should end up with

    type

    Then hit enter which will return

    Enter a passphrase which will return Enter same passphrase again: enter it and hit enter.

    Now close that command window.

  • Finish account setup
    Go to git hub in your account under account settings click the SSH Public Keys
    Open your .ssh folder and open the id_dsa.pub with notepad or another text editor like NotePad++Copy the entire content of that file and use the Add a Key on GitHub and paste it in for your public key.
  • Creating a phpBB Fork
    Now if you plan on submitting patches, etc… to phpBB you will want a fork of phpBB. (It’s like your own phpBB branch)
    Simply go to the phpBB repo http://github.com/phpbb/phpbb3 for the phpBB and http://github.com/phpbb/phpbb for phpBB4 development
    at the top of those pages click the Fork icon which will create a fork in your account.Go back to your dashboard on the right side in Your Repositories click the phpBB3 fork link
    Make a new folder on your PC preferably where you have your localhost setup, like http://localhost/phpBB/

    Make sure your firewall allows access to the access keys in the .ssh directory.

  • The first Clone
    This part works best with Command line because of branches.
    Hover over your folder and press Ctrl + Shift and right click and select open Command Line HereType in

    You can get the above URL by going to your phpBB3 fork , the link is on the right of your GitHub dashboard
    click the link and on the new page select the private git URL

    This will initialize the folder and then ask for your pass phrase then it will download the remote objects.
    This part will take some time with 90274 objects depending on your connection speed, mine is not that good.

    You will now have a clone
    To see, open command line on that directory and type

    Which should return something like

    Note: I apparently didn’t have my fork set to Master by default which is why I ended up with that branch.
    On GitHub when viewing your fork select the Admin button and you can change these settings.

  • Switching Branches
    To change right click on the folder and select TortoiseGit -> Switch/Checkout
    Then in the branch dropdown pick remotes/origin/master whcih should be the latest release.Output will look something like this

    You now have a clone of your fork.

Any changes that you make to this repo and push back will show up for the phpBB development team and they can decide on if they want to use it in phpBB.

You should now be setup with your own working copy and repository fork for phpBB.
99% of the time you will be able to use TortoiseGit options in your right click context menu, but there may be times when command line is needed.

Some Resources
http://git.or.cz/course/svn.html
http://kernel.org/pub/software/scm/git/docs/everyday.html
http://github.com/guides/home
https://git.wiki.kernel.org/