steveukx/git-js

Checking out repo using simple-git from within repo reinitializes repo even when baseDir is set

vbeffa opened this issue · 2 comments

vbeffa commented

I am using simple-git in order to automate some of our CI processes. When I test one of the commands in my local repository (this command clones the repo, creates a new branch, and pushes it to origin), the command appears to work but after it terminates my shell's git no longer sees my local branches, only main. This happens even if I specify the baseDir config option. This option appears to be working as expected, because I am setting it to a tmp dir, and each time I run it it re-clones the repo. If I leave it set to process.cwd(), the command succeeds the first time but then fails the second time with remote origin already exists when it tries to re-clone the repo.

Hello, in order to look into this for you please include the code you are using, and the output from having enabled the verbose logging

https://github.com/steveukx/git-js/blob/main/docs/DEBUG-LOGGING-GUIDE.md

This issue has been automatically closed due to a lack of response. If your problem persists please open a new issue including any additional detail requested from this issue. For more detail on the issues/pull requests see ISSUES_AND_PULL_REQUESTS