diff --git a/CHANGELOG.rst b/CHANGELOG.rst
index 35b1322..3239187 100644
--- a/CHANGELOG.rst
+++ b/CHANGELOG.rst
@@ -2,6 +2,7 @@ v1.14.0
 =======
 
 * publish bdist_egg for python 2.6, 2.7 and 3.3-3.5
+* fix issue #107 - dont use node if it is None
 
 v1.13.1
 =======
diff --git a/setuptools_scm/version.py b/setuptools_scm/version.py
index 40bd89d..b255eef 100644
--- a/setuptools_scm/version.py
+++ b/setuptools_scm/version.py
@@ -106,7 +106,7 @@ def guess_next_dev_version(version):
 
 
 def get_local_node_and_date(version):
-    if version.exact:
+    if version.exact or version.node is None:
         return version.format_choice("", "+d{time:%Y%m%d}")
     else:
         return version.format_choice("+n{node}", "+n{node}.d{time:%Y%m%d}")

empty history results in distance None
`1.11.1` gets `0.0` there
recent releases get `0.1.dev0+nnone.d20161011)`
diff --git a/testing/test_functions.py b/testing/test_functions.py
index eae9e9c..f5e5d87 100644
--- a/testing/test_functions.py
+++ b/testing/test_functions.py
@@ -30,15 +30,15 @@ VERSIONS = {
 
 @pytest.mark.parametrize('version,scheme,expected', [
     ('exact', 'guess-next-dev node-and-date', '1.1'),
-    ('zerodistance', 'guess-next-dev node-and-date', '1.2.dev0+nNone'),
-    ('dirty', 'guess-next-dev node-and-date', '1.2.dev0+nNone.dtime'),
-    ('distance', 'guess-next-dev node-and-date', '1.2.dev3+nNone'),
-    ('distancedirty', 'guess-next-dev node-and-date', '1.2.dev3+nNone.dtime'),
+    ('zerodistance', 'guess-next-dev node-and-date', '1.2.dev0'),
+    ('dirty', 'guess-next-dev node-and-date', '1.2.dev0+dtime'),
+    ('distance', 'guess-next-dev node-and-date', '1.2.dev3'),
+    ('distancedirty', 'guess-next-dev node-and-date', '1.2.dev3+dtime'),
     ('exact', 'post-release node-and-date', '1.1'),
-    ('zerodistance', 'post-release node-and-date', '1.1.post0+nNone'),
-    ('dirty', 'post-release node-and-date', '1.1.post0+nNone.dtime'),
-    ('distance', 'post-release node-and-date', '1.1.post3+nNone'),
-    ('distancedirty', 'post-release node-and-date', '1.1.post3+nNone.dtime'),
+    ('zerodistance', 'post-release node-and-date', '1.1.post0'),
+    ('dirty', 'post-release node-and-date', '1.1.post0+dtime'),
+    ('distance', 'post-release node-and-date', '1.1.post3'),
+    ('distancedirty', 'post-release node-and-date', '1.1.post3+dtime'),
 ])
 def test_format_version(version, monkeypatch, scheme, expected):
     version = VERSIONS[version]
diff --git a/testing/test_git.py b/testing/test_git.py
index 0819fad..c3ae002 100644
--- a/testing/test_git.py
+++ b/testing/test_git.py
@@ -33,6 +33,12 @@ def test_version_from_git(wd):
     assert wd.version.startswith('0.2')
 
 
+@pytest.mark.issue(108)
+def test_git_worktree(wd):
+    wd.write('test.txt', 'test2')
+    assert wd.version.startswith('0.1.dev0+d')
+
+
 @pytest.mark.issue(86)
 def test_git_dirty_notag(wd):
     wd.commit_testfile()

pip install -e .[dev]
parse_log_pytest
pytest
pytest
python setup.py egg_info
3.9
pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
exceptiongroup @ file:///croot/exceptiongroup_1706031385326/work
iniconfig @ file:///home/linux1/recipes/ci/iniconfig_1610983019677/work
packaging @ file:///croot/packaging_1734472117206/work
pluggy @ file:///croot/pluggy_1733169602837/work
pytest @ file:///croot/pytest_1738938843180/work
-e git+https://github.com/pypa/setuptools_scm.git@5ef809f2d0406de1c2c120ec20a415d058387956#egg=setuptools_scm
tomli @ file:///opt/conda/conda-bld/tomli_1657175507142/work

name: setuptools_scm
channels:
  - defaults
  - https://repo.anaconda.com/pkgs/main
  - https://repo.anaconda.com/pkgs/r
  - conda-forge
dependencies:
  - _libgcc_mutex=0.1=main
  - _openmp_mutex=5.1=1_gnu
  - ca-certificates=2025.2.25=h06a4308_0
  - exceptiongroup=1.2.0=py39h06a4308_0
  - iniconfig=1.1.1=pyhd3eb1b0_0
  - ld_impl_linux-64=2.40=h12ee557_0
  - libffi=3.4.4=h6a678d5_1
  - libgcc-ng=11.2.0=h1234567_1
  - libgomp=11.2.0=h1234567_1
  - libstdcxx-ng=11.2.0=h1234567_1
  - ncurses=6.4=h6a678d5_0
  - openssl=3.0.16=h5eee18b_0
  - packaging=24.2=py39h06a4308_0
  - pip=25.0=py39h06a4308_0
  - pluggy=1.5.0=py39h06a4308_0
  - pytest=8.3.4=py39h06a4308_0
  - python=3.9.21=he870216_1
  - readline=8.2=h5eee18b_0
  - setuptools=75.8.0=py39h06a4308_0
  - sqlite=3.45.3=h5eee18b_0
  - tk=8.6.14=h39e8969_0
  - tomli=2.0.1=py39h06a4308_0
  - tzdata=2025a=h04d1e81_0
  - wheel=0.45.1=py39h06a4308_0
  - xz=5.6.4=h5eee18b_1
  - zlib=1.2.13=h5eee18b_1
prefix: /opt/conda/envs/setuptools_scm

testing/test_functions.py::test_format_version[zerodistance-guess-next-dev testing/test_functions.py::test_format_version[dirty-guess-next-dev testing/test_functions.py::test_format_version[distance-guess-next-dev testing/test_functions.py::test_format_version[distancedirty-guess-next-dev testing/test_functions.py::test_format_version[zerodistance-post-release testing/test_functions.py::test_format_version[dirty-post-release testing/test_functions.py::test_format_version[distance-post-release testing/test_functions.py::test_format_version[distancedirty-post-release testing/test_git.py::test_git_worktree
testing/test_functions.py::test_next_tag[1.1-1.2.dev0] testing/test_functions.py::test_next_tag[1.2.dev-1.2.dev0] testing/test_functions.py::test_next_tag[1.1a2-1.1a3.dev0] testing/test_functions.py::test_format_version[exact-guess-next-dev testing/test_functions.py::test_format_version[exact-post-release testing/test_functions.py::test_dump_version_doesnt_bail_on_value_error testing/test_functions.py::test_dump_version_works_with_pretend testing/test_git.py::test_version_from_git testing/test_git.py::test_git_dirty_notag testing/test_git.py::test_find_files_stop_at_root_git testing/test_git.py::test_alphanumeric_tags_match
CHANGELOG.rst setuptools_scm/version.py
CHANGELOG.rst setuptools_scm/version.py