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! 😉
WoWPro, git and XcodeWarning….Mac information follows. Those who could care less about it please feel free to ignore.Since I converted to maintaining my own addons with git instead of svn I decided to actually do the text editing in Xcode. It made the next step much easier as well…integrating the helper code into the projects as well. So all my code that I write to get localized versions of things, ensure “referential integrity”, etc. all stays with the addon code in one project. Then I can deploy a new addon by installing and only the latest and greatest addon files get installed, not the support code.I mention this because lately I have been tempted to actually do some work on WoWPro. I think my development of Wholly has gotten to a point of stasis as I have no other features to add at the moment. And Grail is all that needs to be worked on. But with Wholly I have seen some overlap with WoWPro and I was wondering what can happen with WoWPro and making it into a database. Therefore, I was thinking of making an Xcode project from the git repository. I have no idea whether I want to tackle transforming what WoWPro currently does to something a little more modern and unified as I understand there are already efforts to that end underway. Just musings.Enjoy.
Command LInes for Manly PeopleYeah, I never even thought of using the Mac GUI interfaces into git. I use windows machines at work, keep a Mac on my desk at home and have a Linux server for my home network. The git command line is nicely consistent between all three.At my advanced age, who wants to learn more applications than is necessary!
I actually prefer the gitI actually prefer the git command line, which would make the guide more portable, but it seems most people are more used to PC/gUI/Windows.
I Wish …I wish the documentation on GitHub was as clear.Of course, it is still PC centric and us poor Apple Snobs.Perhaps, I will pull together the Mac variations …