Getting Started with Git and GitHub

Introduction

As part of this course and the larger Integrated Project you will be asked to use Git and GitHub for storing your work. The purpose of Git is to allow you to put the design artifacts or the code you are working on under version control, which means that you can create snapshots of how your work progresses over time. You will then able to move between these snapshots, compare different versions, and rollback changes. This helps you experiment with various approaches without worrying that you could mess everything up. 

Uniqueness of Git

Over time various version control systems have developed. For example, some might be familiar with SVN. The difference between Git and SVN is that Git is decentralized. This means that Git stores a full copy of the project files and the version control system both on your local computer and on a server, such as GitHub. This allows you to use Git when you are offline and if something happens to either the copy on your computer or the server, then you can easily restore everything. 

Working with Git

There are several options for using Git. The basic option is to use the graphical interface provided by GitHub for Mac and Windows. It is also possible to use Git through the Terminal on the Mac, or the Command Prompt or PowerShell on Windows. This will give access to advanced options, but requires you to make sure that Git is installed on your system. It is possible that you might need to download it separately, if you decide to skip the GUI version. 

Working with Git has several stages. You make changes to the files located in your working directory. As soon as you are done you stage or index the files that need to be added to a new snapshot and then commit your changes to the version control database, located in a special .git directory, to be stored there as a new snapshot of your work. Remember to include a descriptive message with every commit, so that it is easier to understand what changes have been made.

All of the things described previously are done locally on your computer, but can afterwards be pushed to a server, for example GitHub, to make it easier to collaborate with others. 

Working with GitHub

GitHub is an online service that helps you collaborate on development projects with others. It builds on several important concepts that you should be aware of. First of all, if you are working on a project with several people, then you don’t generally modify the main version of your code, which is called master. Instead, each of you should create a branch to  work on a specific feature. For example, you could create a branch for editing the README file, which provides an introduction to your project. You can then work on this branch until you are ready to integrate the changes into the main project. Next, you then initiate a Pull Request, which is basically a request for feedback from your peers. This starts a discussion on GitHub, which may lead to your changes being merged into the master copy. Afterwards, the branch you have been working on can be removed, as it is no longer needed. 

GitHub also allows you to open Issues to highlight the things in the project that need to be improved. You can then associate Pull Requests to specific Issues. Adding fixes # into the title of a Pull Request will help GitHub associate the Pull Request with a specific Issue and automatically close it if the fix has been accepted. 

On GitHub you can fork a project, which is owned by someone else. This will create a copy of that project under your GitHub account. You can then clone that project to your computer to work on the code as you will essentially become the author of the fork. Afterwards, you can make a Pull Request to propose your changes to be incorporated into the original project. 

Finally, GitHub provides you with means for creating wikis to store project related information. You can also create a separate web pages for showcasing your project. GitHub offers you several templates as well as the ability to work with the HTML directly to achieve the result you want. This feature might be used at a later point as part of the Integrated Project course. 

Additional Resources

This has been a brief overview of the main concepts of Git and GitHub. Please take a look at the pages listed at the end of this post for additional information and guides on how to use Git in your coursework. 

Welcome to the Course

Dear participants,

We would like to welcome you to the 2016 edition of Developing Interactive Systems. We designed the course to introduce you to the current mainstream platforms that you can target for developing your prototypes. During this semester we will discuss developing applications for smartphones, tablets, smartwatches, and smart TVs. You will have a chance to create prototypes for each of these platforms and finally will be able to choose one or several of them to develop a more complex group project. As a result, you should get hands-on experience of creating software individually and in teams. We are planning to discuss several of the currently available operating systems, however for the practical part we will focus on Apple’s platforms and development tools to ease the learning curve and allow easier transfer of concepts. For this reason we will be mainly using the Swift programming language and the Xcode development environment.

We are looking forward to meeting you and hope that the upcoming course will very be exciting for all of us.

With kind regards,

Ilya and Sónia