diff --git a/archivebox/main.py b/archivebox/main.py
index f8a781e8..86d2d172 100755
--- a/archivebox/main.py
+++ b/archivebox/main.py
@@ -220,7 +220,7 @@ def version(quiet: bool=False,
         
         COMMIT_HASH = None
         try:
-            COMMIT_HASH = list((PACKAGE_DIR / '.git/refs/heads/').glob('*'))[0].read_text()
+            COMMIT_HASH = list((PACKAGE_DIR / '../.git/refs/heads/').glob('*'))[0].read_text()
         except Exception as e:
             print(e)
             pass