Designing Your Own Commit Graph With Git

Git log is a very powerful tool for tracking all your changes, even across different branches and multiple repositories. However git log default output is verbose and not a great way to visualise the commit history.

Fortunately Git is very customisable, both for humans and tools. This article covers one way to creating your own customised output for git log that helps you work with branches and track changes through local and remote (eg. Github) repositories.

Read More

Starting Nodejs Development on Ubuntu

Outdated: please disregard this article as it is out of date. I install node in my local filespace on Ubuntu now as its so much easier to manage. Basicaly I download the Linux binaries and put them in ~/apps/nodejs/current, then add ~/apps/nodejs/current/bin to my path using my shell profile (~/.profile). This makes using npm -g really easy and does not require the sudo command.

nodejs is a very popular framework for JavaScript development, but as I found out at the MongoDB hackathon its not that straight forward to get going. So here is a quick guide to get going with Node.js on Ubuntu.

Read More

Global Git Ignores Make Collaborative Development Easier

Lots of developers are using git, especially when working on projects together.  However there is not one single developer tool that every one uses, so there is potential for a lot of unwanted files to end up in your project.

Rather than pollute the .gitignore file for the project with every development tool under the sun, its much more effective to add development tool specific files to your own global ignore file ~/.gitignore_global.

Read More

Git Log Makes Multiple Repos Easier to Track

Git is a great developer tool for managing and sharing code. Its really easy to get started with, especially with services such as Github and their excellent website. I quickly became comfortable with the basic developer cycle:

git init
git status 
git add filename
git commit -m "useful message"
git push
;; back to git status...

To keep track of changes when you just have a local repository is easy with git status.

Read More

The Git Father - a Forking Badass T-Shirt

The Git Father. The only t-shirt to wear when teaching other people who to use git and Github.

One day I will actually iron my t-shirts :)

Thanks to Clearvision for creating such a great t-shirt. Check out their Go Git website for ideas on adopting git in your organisation.

Thank you.

This work is licensed under a Creative Commons Attribution 4.0 ShareAlike License, including custom images & stylesheets. Permissions beyond the scope of this license may be available at @jr0cket
Creative Commons License

Continuous Integration With Travis-CI, Scala, Play2 and Heroku

During the London Scala community hackday at the Guardian, we first put together the LSug community webapp. For this we used Play2 framework, MongoDB, Github for pull requests and deployed onto Heroku.

Towards the end of the hackathon, someone suggested we also wired the project up to Travis-CI, although none of us knew much about using it. As the hackday was all about discovering how to use new stuff, I decided to add Travis-CI and worry about setting it up when we got to it.

What is Travis-CI ?

Travis-CI** is a continuous integration service that allows you to run build jobs and tests automatically, straight from Github. Its ideal for open source projects.

As its on the web then there is no installation required and its really easier to configure. You simply point Travis-CI to your Github account and you can choose which projects you want Travis-CI to run on. Travis-CI will scan you public repositories, as well as any Github organisations you are part of. Its then an easy matter of switching on those repositories you want Travis-CI to monitor (eg. build, run tests, etc.)

Travis-CI in action

Whilst Travis-CI has been pointed to the the lsug-dojo/lsug-website repo on github via my account, no one got round to adding a Travis-CI configuration file. The down side of this is that those contributors to the lsug-dojo/lsug-website repository received an emailed error message each time something was pushed to the repository or a pull request was accepted.

Not having a working Travis-CI was also noticeable when reviewing pull requests, as Travis-CI talks to Github and lets it know that your projects have failed. It then up to you wether you still want to merge.

Screenshot taken from travis-ci blog

With a quick Google I found an example travis-ci configuration file for Play 2 framework. I just dropped in a new .travis.yml file into the lsug-website github repository and that triggered another travis-ci build. This time the test ran and passed!!

Screenshot taken from travis-ci blog

One benefit of using Travis-CI is to encourage the use of tests, it also gives information about the state of the github repository. This is especially useful when working with pull requests.

This is the first time I have used Travis-CI and it was really easy to configure. If you have any comments or ideas about this, please share them with the group or myself directly.

Thank you.

This work is licensed under a Creative Commons Attribution 4.0 ShareAlike License, including custom images & stylesheets. Permissions beyond the scope of this license may be available at @jr0cket
Creative Commons License