Tag Archives: git

Changing the committer

Quite often, I find myself using git for non-work related activity on my work laptop. Yeah, yeah, I know. Normally, I remember to set my email to be my home address before starting work. $ mymail=’dom [at] happygiraffe (dot) net’ $ git config user.email $mymail$ mymail=’dom [at] happygiraffe (dot) net’ $ git config user.email $mymail […]

temporarily ignoring files in git

Quite often, you want to change a file temporarily whilst you work on something, but you know you don’t want to commit it. Right now I want to change my project’s logging from INFO to DEBUG, but I don’t want to commit that. There’s a command git update-index which has a flag –assume-unchanged. And it […]

Solr's Lucene Source

I’m debugging a plugin for Solr. I’ve just about got the magic voodoo set up so that I can make Eclipse talk to tomcat and stick breakpoints in and so on. But I’ve immediately run into a problem. Even though Solr itself comes with -sources jars, the bundled copy of lucene that they’ve used doesn’t. […]

Publishing a subdirectory to github pages

I’ve written some HTML documentation for jslint4java. It lives in jslint4java-docs/src/main/resources in typical maven fashion. I’d like to get it published on github pages. The starting point is similar to their documentation. git symbolic-ref HEAD refs/heads/gh-pages rm .git/index git clean -fdx echo "My GitHub Page" > index.html git add . git commit -a -m "First […]

Mercurial support on Google Code

Google Code Blog: Mercurial support for Project Hosting on Google Code: We are happy to announce that Project Hosting on Google Code now supports the Mercurial version control system in addition to Subversion. This is great news. I love git, but mercurial is also widely used by many projects (Python, Mozilla, …). Bringing DVCSs to […]

Searching through all revisions

A colleague was asking: I’m trying to work out a technique for searching for an occurrence of a phrase in _all_ revisions of a specific file in a subversion repository. How can I do this? Of course, in subversion, the answer is slow and complicated. But, you can use git (and git svn in particular) […]

git tree

Just a quick one based on today’s git ready: text-based graph. That describes how to get nice ascii-charts of your git repo. But the command is too long to type. So: git config –global alias.tree ‘log –graph –pretty=oneline’ git config –global alias.tree ‘log –graph –pretty=oneline’ Now, I can just do git tree. Lovely.

Github Pages with Maven

Github recently introduced their pages feature, for serving static content. This sounds like an ideal match for a maven , so I thought I’d give it a go. I managed to get happygiraffe.github.com/tclogview/ up and running in fairly short order, but I’m not totally happy with the end result. And that’s not just the fault […]

Commit Messages

I’ve been using git for most of this year. It’s been a really excellent ride, and the things it enables are wonderful. But one of the things I’ve found most handy is a convention. The commit message is treated like an email: one line of subject and then a few paragraphs of explanation. Keep the […]

The best subversion client

The best subversion client I’ve used to date? git. It’s so script-friendly! This morning somebody asked me for a complete history of a project in CSV format. Using my nicely cloned repository, it was a simple matter of giving the correct format to git log. ⇒ git log –pretty=’format:%h,%ai,%an,%s’ | head -5 f584913,2008-09-26 21:58:02 +0000,Dominic […]