Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot clone repositories when not inside a git repository #147

Open
ivomurrell opened this issue Jul 26, 2021 · 1 comment
Open

Cannot clone repositories when not inside a git repository #147

ivomurrell opened this issue Jul 26, 2021 · 1 comment

Comments

@ivomurrell
Copy link
Contributor

ivomurrell commented Jul 26, 2021

Now that we can no longer assume the HEAD branch of the git remote we're cloning, we call git remote show to ascertain what the active branch is (usually main in our repositories.) However, bizarrely, the git command fails to run if we aren't running nori inside a directory with a .git directory, throwing an error of

fatal: not a git repository (or any of the parent directories): .git

Not sure what the best way around this is, perhaps by setting the CWD to the repository we've cloned when running the git show command (making sure to only get the HEAD branch after we've cloned,) so that we'd always be running it in a directory with a .git directory?

@stale
Copy link

stale bot commented Jan 9, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@stale stale bot added the stale label Jan 9, 2022
@ivomurrell ivomurrell removed the stale label Mar 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant