Deprecated Behaviour

The inane, sometimes insane, ramblings from the mind of Brenton Alker.

Telecommute Experience (Part 1)

I’ve just started telecommuting, and not wanting to take it slowly, I’ve jumped straight into an international arrangement; living in Canada and working in Brisbane, Australia. This is my story…

After almost 3 years with my current employer, I decided I needed to get out of the office. Not that there is anything particularly wrong with the office, it’s just not the most exciting environment and I was getting pretty over it.

It just so happened that a number of my friends were in a similar situation, and a plan was hatched to move ourselves to Canada for 6 months. Once an approximate timetable was established, we approached our respective employers. After explaining the plan to make the move and maintain our current employment, for the most part we met little resistance; this was a little surprising to me.

So the approximate plans were filled with some more details, and off we went.

To Be Continued…

Basic Branching With Git

With 3 long-running tasks concurrently on my plate, I finally got around to learning branching in git, and it’s easy!

Until this week, I had managed to get by without learning to branch. I have looked previously but got a little lost. I often temporarily stored my work using “git-stash” to work on multiple things at once, but this is very limiting.

So, Here we go. My basic workflow now look like this.

Create a new branch (based on the HEAD of your current branch), and automatically switch to it:

<code><a href="http://www.kernel.org/pub/software/scm/git/docs/git-checkout.html" title="git-checkout manual page">git checkout</a> -b my_branch</code>

Then you can work within this branch as you always would.

Work, work, work…

<code><a></a><a href="http://www.kernel.org/pub/software/scm/git/docs/git-add.html" title="git-add manual page">git add</a> files_i_have_edited.txt
<a href="http://www.kernel.org/pub/software/scm/git/docs/git-commit.html" title="git-commit manual page">git commit</a> -m 'My changes'</code>

Repeating this step until the task is complete. Then, to get the changes back into the master branch. Switch to it

<code><a href="http://www.kernel.org/pub/software/scm/git/docs/git-checkout.html" title="git-checkout manual page">git checkout</a> master</code>

And pull the changes from the branch

<code><a href="http://www.kernel.org/pub/software/scm/git/docs/git-pull.html" title="git-pull manual page">git pull</a> . my_branch</code>

Easy. No need to remember revision numbers where you branched, or which changed have already been merged. You can of course switch back to the branch and continue work with

<code><a href="http://www.kernel.org/pub/software/scm/git/docs/git-checkout.html" title="git-checkout manual page">git checkout</a> my_branch</code>

this “edit, commit, pull” cycle can continue until the task is complete. Then, once you’re satisfied you can delete the branch with

<code><a href="http://www.kernel.org/pub/software/scm/git/docs/git-branch.html" title="git-branch manual page">git branch</a> -d my_branch</code>

It’s still in the history of course, but no need to keep old branches around.

Hope that makes things clear to anyone else who was confused as I was by some of the overly complicated explanation of branching in git.

New VPS Hosting

If you’re reading this then I have successfully migrated to my new VPS hosting on Slicehost.