Setting Up Version Control – Unity

After a morning of confusion and multiple upgrades, myself and Bobbie finally got version control working on both our laptops.

Yesterday Bobbie managed to find a way for a live Unity project to be hosted online which allows both of us to access updated files and keep on-top of version control.

 

With Bobbie’s familiarity with Git Hub she suggested us to use this as she had had success with it in the past and uses it for her work, showing it to be of a professional standard. Bobbie discovered Source Tree which is a graphical user interface (GUI) for Git Hub and visualises what it is doing making it far easier to understand what is happening and where the versions lie.

Creating a Bitbucket account I used this to sign into the Source Tree application, where I will be able to access all versions of the project.

 

Notes

 

  • Formed a Bitbucket account
  • Downloaded Source tree – Uses Git hub – Visualises the versions on git hub – easier to use
  • Allows us to both work on the same project at the same time – Live versioning
  • Multiple versions – Controls – Go back or forward through versions to ensure we don’t break the code
  • Master Branch – Where the main playable game will be – Only put things here that work – no testing or experimenting
  • Create branches off of the master branch where new mechanics or features can be added and experimented with to ensure they work before adding them to the mast branch.

 

  • Before opening Unity go onto Source Tree – Click fetch  (this will fetch new changes made by other team mates) – then click pull (gain all the new files to then be able to use)
  • Click Branch to create a new branch
  • And click merge to merge branches
  • Then start editing the Unity project (check you’re on the right version)

 

Experimenting with Source Tree

We did some experimentation with Source Tree/ Git Hub to test if the Unity project would work on both our laptops, particularly if all information would be passed between Bobbie’s Mac and my Window’s set up, which we thought could be an issue.

We learn’t that it works fine even being on different systems and there are no issues with information being wrongly transferred, so that’s comforting.

 

We tested Git Hub/ Source Tree more to better understand what the limitations of it are and what would break the project, if anything. We did this by creating multiple branches and working on the same project at once, changing the same files and then committing them, as well as changing different files and committing them.

 

Our findings

  • Not advisable to both work on the same file in the project at once as Unity and Git Hub freaked out when we tried to merge both mine and Bobbie’s work together, forcing us to choose which version we wanted to use and then this had to be manually changed in the text editor, which was complicated and I could see many issues arising from this.
  • It is fine to be working on the project at the same time when working on seperate files, as the versions can easily be merged together without any issue.

So from this our plan is to try to avoid working on the same files of the project at once, or even the same project at the same time, simply to avoid possible issues with merging versions. However I don’t feel this should be too big an issue as there is only two of us so it is easy to communicate what version and files we are using and when, so we will know what not to mess with.

 

picture1

Image of our branching experimentations

Advertisements