Tag Archives: git

Inside Look – Git Flow

Working on small projects, picking up a version control system (VCS) was hardly a must for me. I don’t any project here has ever had more than 4 people working on it at once. Nevertheless, using Git and a well established process can be incredibly useful for even the individual coder. It allows a one (or multiple people) to work on multiple paths of a project without (or at least little) worry of seriously corrupting the source code. Git is known as a decentralized version control system. There is no one golden repository which everyone must work from. In fact, any individual has their own copy of the repository which they can use to track their own local changes as they’re working. There are many ways to use Git to keep on top of a project and I think everyone finds their own style, but I’d like to share what I’ve been using.

My projects consist of two main branches, master and develop. These branches will always exist and will never be removed.

The two main branches.

The two main branches.

Master is considered sacred and only touched if a completely sound production release is ready. Instead, develop contains typically the latest, active, and (reasonably) working code. When a the team has a new feature they want to introduce, they create a branch off of develop. This is called a feature branch. This is worked on until completed and then merged back into develop. Sometimes, merges may happen before a feature is fully completed. Maybe there was a specific change that needed to be present in develop for other feature branches or some bug was found.

A feature branch example

A feature branch example.

In a perfect world, these are all the branches of code you would ever need to care about. There are many corner cases that can occur where you may need to create a hotfix branch to fix a bad release on master, you may have a feature with sub-features being worked on, and many more. For a nice example, here’s a bigger picture of what that may look like.

A full Git Flow example.

A full Git Flow example.

Huge credit goes to Vincent Driessen for these images. You can find his post at http://nvie.com/posts/a-successful-git-branching-model/ which describes the full process. Over a year ago when I was just getting into this Git thing, his post allowed me to finally grasp a good method of using this powerful tool.

Tagged , , ,

More on Git

So with the new project, I’ve chosen to stick with good ol’ git to manage our version control. This is quite a challenge when it comes to Unity3D, as there’s a large number of irrelevant files that will get changed, added, and deleted which really should be ignored. In comes .gitignore. Without it, version control in Unity would be a nightmare. It took me a bit of searching to find a nice list of the type of files I should be excluding, so I want to make sure to post it here for anyone else that might need it:

# =============== #
# Unity generated #
# =============== #

# ===================================== #
# Visual Studio / MonoDevelop generated #
# ===================================== #

# ============ #
# OS generated #
# ============ #

Also, just starting using Sourcetree instead of TortoiseGit to have a bit more of a visual process for those new to VCS’s. They’re also the makers of bitbucket.org which we’re using to host the project so obviously the support is there! Currently exploring the possibilities of GUI elements for Unity! Quite handy (and a hell of a lot easier than using pygame to make simple windows!).

Tagged , ,

Getting Started With Git

I’ve chosen to use git as my version control system (VCS) for The First Fantasy that is currently hosted on github. Git is a more complicated VCS than some others such as Subversion, but it provides a few features that is only possible with a fully distributed workflow. Simply, git allows each developer to have their own private copy of a remote shared repository that can be modified and changed without effecting anyone else’s work until the developer decides to push their local changes (called commits) into the remote repository.

Git has a full range of powerful console commands, but if you’re looking for the convenience and visual ques of a GUI, there’s a number of options out there. I currently use EGit, a git package for Eclipse that integrates itself into the tool. The official git site features a number of GUI clients. I highly recommended using GitHub as it integrates well to their project hosting site, SmartGit, or the built-in GUI (gitk and git-gui) that comes with git. For those wanting to bust out your command prompt skills with git, this is a nice guide that will get you started.

To make a clone of my project and get started, all you need to do is give the following command:

git clone git://github.com/Bluedagger21/the-first-fantasy.git

If you have any good experiences with a particular way of using git, fill us in!

Tagged , ,

How to Contribute

For those completely unfamiliar with version control systems (VCS), I’ll make a post in the future that should be able to get you started to at least navigate your way around an recognize certain aspects.

The First Fantasy project is hosted on github, a popular “social” open-source project hosting site that uses git as its form of VCS. Github provides a number of obvious benefits to project managers and contributors alike and attempts to make the whole contribution idea as painless as possible. I would highly recommend checking out some of their basic guides to get a feel for things and then go ahead and fork The First Fantasy repository to play around with it. Don’t worry! There’s no possible way to cause any harm to the original repository without being an assigned contributor of that project (by me). You can still make pull requests that will let me and the contributors know you have made an addition or change that needs review to be implemented into the project.

I’ve made a wiki page on the project’s page that describes the intended workflow. After spending this latest release getting used to the workings of git and github, the wiki page should give a good idea of what the overall “process” will look like. Think of it as a guide to how we can make the most of contributions without stepping on people’s toes. By following this, we should be able to produce meaningful results that are easily tracked and implemented.

If you don’t want to get involved with github just yet, you can always download a source zipball to mess around with a copy of the repository. If you have any questions or comments, please let me know! I’d be happy to help in anyway I can.

Tagged , ,

Source Code Available

After a few requests and me finally succumbing to the beauty of open software, I’ve made a repository on github to host my project and for anyone to view and possibly contribute. You can access that repository here:


Transitioning over to git was more complicated than I would have liked, but I can definitely see the advantages of using it over subversion although I will miss its simplicity. Anyway, this will mean a few changes to links on this site and how Downloads will work. I’ll be hosting the distributable versions of The First Fantasy in the downloads section on github, but linking to those from my blog. As the link to the source is always the same, it will have it’s own section in the Downloads page.

I’m hosting the project to the public to share, learn, and help others that are open-source project newbies get on their feet. There’s still a lot of documentation that I’d like to do so viewers/contributors can better understand my thinking, and you can expect additional commenting to be a priority right now. If you have any questions, please feel free to send them over to me. I might even make a post to explain a process I use.

Tagged , , ,
%d bloggers like this: