else
python3 scripts/update_repo_metadata.py $(or $(CSV),scripts/repo_metadata.csv)
endif
+
+.PHONY: git/init-remote
+git/init-remote: ##H @Remote Initialize a new bare repository on VPS (usage: make git/init-remote REPO=projects/new-repo.git)
+ifndef REPO,OWNER,DESC
+ $(error REPO/OWNER/DESC are undefined: '$(REPO)/$$OWNER/$(DESC)'). Usage: make git/init-remote REPO=projects/new-repo.git OWNER="Shane" DESC="New repository")
+endif
+ @echo "Initializing bare repository $(REPO) on $(VPS_HOST)..."
+ ssh $(VPS) "mkdir -p /srv/git/$(REPO) && cd /srv/git/$(REPO) && git init --bare && touch git-daemon-export-ok"
+ifdef OWNER
+ @echo "Setting owner to $(OWNER)..."
+ ssh $(VPS) "git config --file /srv/git/$(REPO)/config gitweb.owner '$(OWNER)'"
+endif
+ifdef DESC
+ @echo "Setting description to $(DESC)..."
+ ssh $(VPS) "echo '$(DESC)' > /srv/git/$(REPO)/description"
+endif
+ @echo "Repository created. You can now push to it:"
+ @echo " git remote add origin $(VPS_USER)@$(VPS_HOST):/srv/git/$(REPO)"
+ @echo " git push -u origin main"