Git Shortcuts

August 12, 2011

Reading time ~1 minute

Whenever I clone a repo from Github I'm used to being able to use git pull and git push on their own to pull and push from origin and to master respectively.

When I set up my own git repo outside of Github, I wondered why these didn't work out of the box. Executing those commands would give me an error saying Git doesn't know which branch to merge with...

It turns out you can set up your preferred remote and local branches to pull and push to and from. Just edit the config file inside the .git/ directory in your local repo.

You may find that if you added a remote repo previous the [remote] section will already be present.

[branch "master"]
        remote = origin
        merge = refs/heads/master

[remote "origin"]
        url = url/to/my/gitrepo.git
        fetch = +refs/heads/*:refs/remotes/origin/*

The Day I Was Hacked

It was 4am on a Saturday in 2013 and I was sleeping. My iPhone was sitting on my bedside table, plugged in in silent mode. It buzzed once...… Continue reading

Siri Remote - The Future of Gaming?

Published on September 20, 2015

Open Source Is Not 'Do What You Want'

Published on April 29, 2015