You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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?
The text was updated successfully, but these errors were encountered:
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 (usuallymain
in our repositories.) However, bizarrely, the git command fails to run if we aren't runningnori
inside a directory with a.git
directory, throwing an error ofNot 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?The text was updated successfully, but these errors were encountered: