Monday, March 30, 2009

Using git push

I'm starting to use git for some actual work, and am making tentative steps towards not totally sucking at it.

Right now, I'm trying to get a handle on working with remote repositories. In theory, because git is fully distributed, you don't need a central repository. However, I want to use remote repositories to (1) ensure my data is backed up (I have access to a Solaris server with a RAID and regular disk backups), and (2) allow easy synchronization of my work between the various machines I use (office PC, laptop, etc.)

The main idea with git is that repositories and working directories should be inseparable; all work should be versioned. Being a distributed VCS, git gives you lots of ways to synchronize changes between repositories. All well and good.

However, weirdness ensues when you consider what git should do when you push (commit) changes from a local repository to a remote repository. If you push into a remote repository that has a working directory checked out from the branch that you are pushing into, git does weird things. I won't even attempt to describe what happens, since I don't understand it. Suffice it to say that it's not a useful behavior.

One solution, as helpfully pointed out by the git cvs migration help file, is to create the remote repository as a "bare" repository, meaning that it does not have an associated working directory. So, the series of steps is something like:
server$ cd /some/directory && git --bare init

client$ git clone username@server:/some/directory
[ add some files ]
client$ git add files...
client$ git commit -m"Added some files..."
client$ git push origin
The "origin" in git push origin evidently refers to the remote repository from which the local repository was cloned.

Sunday, March 29, 2009

Good book on git

I found a good book on the git distributed version control system:

Pragmatic Version Control Using Git

This is the first good introduction to git (and to distributed version control in general) that I've seen.

Thursday, March 26, 2009

An addictive game

Beware: this is a potential time sink.
MiniGolf.zip [for Windows systems]
See the included README.txt for details.

Screenshot:

Monday, February 16, 2009

Q&A: How to use the command line to create a new top-level Opera window

When I click the "quick launch" button (or whatever KDE calls them) to open a web browser, I like to have a new top-level window, not a tab of an existing browser window.

Opera, by default, creates a new tab in an existing window.  So, I hunted for a command line option to force it to create a new window.  Here are the command line options:

http://www.opera.com/docs/switches/

Sure enough, there's a -newwindow option to create a new window.  I try it, and what does it do?

It creates a new tab in an existing window.

Thanks, Opera.

Thursday, February 12, 2009

Firefox working again

A reboot seems to have cleared up yesterday's firefox issue. Weird.

I guess I should probably quit out of firefox when a package update is being installed.

Wednesday, February 11, 2009

Firefox broken by update to Kubuntu 8.04

I received an update for firefox today on my main office machine (running Kubuntu 8.04), and firefox is now completely broken.  All it does now is exit immediately with a 0 exit code.

I have temporarily switched to Opera, which seems quite nice.

Tuesday, January 20, 2009

Reset your windows password

I forgot my windows password recently. Fortunately, if you can boot from a CD, the following Linux-based utility will allow you to easily reset passwords:
http://home.eunet.no/pnordahl/ntpasswd/
W00t.