by cmehdy · 6y ago · 0 comments
I've noticed that if I run a clone `git clone https://gitexercises.fracz.com/git/exercises.git` it gets cloned in "DETACHED HEAD" mode and I need to checkout master, i.e. `git clone https://gitexercises.fracz.com/git/exercises.git -b master`.
Any idea why that is? (It ultimately wasn't a problem once I switched to master, but without doing so there would be no configure.sh script either and I'm asking in case someone else runs into the same issue).
As for how you can end up in such a state on the remote, I'd actually be interested to know too.
Currently, the initial HEAD actually contains the solution for a future exercise. It was also created by a different user than the rest of the exercises.
Maybe the detached HEAD should contain a README with instructions like "You are in detached HEAD mode, reach the master branch to continue"