This is the Part 2 of the guide on how to use git / github, covering Forking github projects and managing local and remote repositories.
Table of Contents
- Tutorial: Forking & Remote repository
- Tutorial: Setting up keys
- Tutorial: Creating a local repository
- Important notice for WoWPro project
1. Tutorial: Forking & Remote repository
So, by now, you should have your very own github account.
Let’s add a project to it, by “forking” WoWPro’s addon, from Jiyambi’s original repository.
Nomenclature: Fork: make a full copy of a github project in order to start independent development on it.
For that, while logged into Github, go to Jiyambi’s repo, here: http://github.com/Jiyambi/WoW-Pro-Guides
Ok, now you have a forked version of WoWPro’s addon. Don’t worry about all the news things that came up on that page, we’ll be dealing with some of them as the guide progress.
As you can see, your forked project is called username/WoW-Pro-Guides, which will be your personal remote repository of WoWPro.
2. Tutorial: Setting up keys?
Before we go on with the tutorial, let me explain a bit the next steps. The communication between your local and remote repo(s) is done via the SSH protocol, by using a pair of keys that can recognize each other. One of the keys, called private, will be stored on your local computer (and attached to you local repo) and the other key, public, will be given to github (the remote).
But how do we create a pair of keys in the first place? Fortunately, GitExtensions has a tool to generate pretty unique keys. Click on Remotes->PuTTY->Generate or import key.
3. Tutorial: Creating a local repository
Now let’s finally download the repo. Go back to GitExtensions, click on ‘Clone repository’. Paste the just copied address into the field: ‘repository to clone’, choose a place for it in ‘destination’. In the field ‘branch’, just pick ‘master’. It should look like the following:
Important notices for WoWPro project
Before moving on with the guide (in part 3), which will deal with the actual editing of file codes, I’d like to draw attention to two things regarding how WoWPro addon project is organized:
- If you follow my guide here, you’ll notice that I taught you how to create your own version (forked) of WoWPro addon. For the part 3 of the guide, if you keep following it, any changes you make to the file codes (locally and, then, remotely) will not automatically be incorporated into the “official” addon project itself. Instead, the changes made will lie on your forked version (username/WoW-Pro-Guides). After that, if you’d like your changes to be incorporated into the addon, I’ll explain how to “open a ticket” to Ludovicus or Jiyambi so they can analyze the change and make the merge.
- To make it easier for Ludovicus or Jiyambi to update the addon with the recent guide changes/correction, the guide files should be updated on their respective pages here on WoWPro. So, even though you could make the changes through git/github, you should do them by editing the pages on WoWPro, or your changes won’t make through.
Part 3 should be up soon, where by soon ™ I mean when it’s ready! 😉