Not In a git Directory
Hi,
I have a NodeJS server I'm trying to deploy → it runs a build script that pulls code from Github (for a git submodule w/ files the main project reads from). I'm getting the error
not in a git directory
when I try to run git
commands.
Here is my script buildCms.js
:
7 Replies
Project ID:
dcbbcdb7-cd29-4c80-9a47-6a3f66851471
as far as I know, the .git folder is not included in the repo
maybe I need to run
git init
pretty sure if I just ran a normal git clone
everything works (which makes sense considering that doesn't assume an initialized git repository)
will try this - I originally thought that the git
binary just wasn't theregit clone will pull from a repo and make the .git folder
and git init will initialize a .git folder
right
yes
git init
worked - command now runsSolution
adding a
await execAsync('git init');
as first commandupdated (had to run
git submodule add
for the submodule to pull, odd because .gitmodules
should be in the file tree, but I don't think git init
pulls that data into the fresh .git
folder's data)