search upwards for .git directory