Development projects that are constantly improved on and scaled are most often the result of lots and lots of changes and team effort. We learn this early on as students, but we aren’t always taught the tools to track our work or collaborate efficiently. Enter Git – a system that allows you to “save” your work as versions and share your own group (think thesis!) and projects in public domains.
The Git Code Camp held on 5 March 2016 was attended by 40 college students. It started off with a quick talk from Dean Canlas about Developers Connect Philippines or just simply DevConPH. It’s the primary non profit organisation in the Philippines that supports and develops students and professionals in the Filipino IT community.
Usually collaboration tools like Git aren’t taught in schools, so new programmers have to learn them on their own, which makes code camps like this very practical for IT students. Git is a distributed version control system that helps organise code into one codebase where people go to so they can collaborate on that code, instead of sharing code through emails or dropbox.
The students downloaded and installed Git and then used an interactive tutorial found on try.github.io. They learned how to install, pull, push, commit and check logs. Best practices were also shared like how developers using git should commit every feature or change they do and checking git status for updates before changing any feature in the code.
In the main workshop with Bryan Bibat, President of DevCon, he reiterated the importance of saving in versions or states or stages in development. It allows developers to go back to a specific stage to review changes in case something goes wrong or development takes on big new features. The old way of zipping saved files to keep track of changes is time consuming, not to mention inefficient as sometimes only one small change to a line is necessary. Using Git allows devs to conveniently change just one line of code without unpacking a whole zip file.
Resource Speaker Bryan Bibat
Git also gives new developers coming into a project a detailed view of how a branch developed and sometimes, even a way to fix a bug. There’s also accountability to writing codes because you can see who made the commit and see each contribution by team members. Another useful feature of the system is staging, which allows a dev to preview adding files and codes to a codebase. Once the dev is satisfied with how everything looks in the snapshot, that’s the time to git commit.
Here are two of the resources Bryan shared with the participants:
Write good commit messages. These are messages or notes that talk about the change you made. It helps other developers who might want to know why you did what you did. You can add many lines of message but if possible, limit it to one line as a summary
Commit often. Not every file, but commit related changes.
Do not commit generated files like temporary files. Just commit the code because you can recreate the generated file just using the code.
Do not commit sensitive information especially passwords, settings.
After the workshop, special prizes were given out to those who gave correct answers to the Q&A, active in Social Media, and actively asking questions throughout the workshop. The day ended with a mini-hackathon. The challenge was to create a repository (DevCon Git Code Camp) in Github where at least 2 or 3 people were able to collaborate.