coderoad-vscode icon indicating copy to clipboard operation
coderoad-vscode copied to clipboard

Add git init step

Open jcandan opened this issue 10 months ago • 1 comments

Is your feature request related to a problem? Please describe.

To run a CodeRoad tutorial, the documentation instructs you to open an empty project.

If the folder already contains a .git/ directory, the tutorial errors after hitting Start.

If you forget to git init, the tutorial will silently fail.

Describe the solution you'd like

We could either:

  • Update documentation to account for the need to run git init in the steps leading up to running a tutorial.
  • Allow .git/ directory to exist when opening an empty folder.
  • Automatically check whether git is instantiated in a folder and run git init if it is not.

Describe alternatives you've considered

TBD

Additional context

  • #622
  • #626

jcandan avatar Feb 05 '25 20:02 jcandan

Of the SelectTutorial forms, selecting a tutorial via the TutorialSelect dropdown captures all of the project files from the tutorial, including their .git/ folder, circumventing this issue. But the File and URL options require the user to git init before they initiate the tutorial with the Start button.

We really should document this in the UI and documentation, or allow .git/ directory to exist when firing up CodeRoad--however, I could see the latter being problematic for the same reasons described in #627.

jcandan avatar Feb 10 '25 13:02 jcandan