Ignore detached heads

Fixes #43