https://www.theodinproject.com/lessons/foundations-git-basics this is the lesson that i am following. I completed the Create the Repository section successfully. I also completed the Use the Git Workflow section successfully. It’s the Modify a File or two where I am facing all the difficulties.

Can someone please show me the way how to do it ?

  • Muehe@lemmy.ml
    link
    fedilink
    English
    arrow-up
    4
    ·
    12 days ago

    Ideally, the readme.md has already been created by the time l reach here or no ?

    Depends, if you followed the tutorial precisely it should already have been created in the step “Create the repository 3.”. You can use the ls command in the WSL terminal to see if it exists.

    If not, where do I create the readme ?

    In the base directory of the git repository you cloned from Github. You can do so with the command echo "blaaaa" > README.md (this will overwrite the file if it exists already).

    In the WSL terminal or the vs code terminal ?

    See I think this is your misunderstanding right here. The tutorial tells you to enter code ., where code means “start VS Code” and . means “in the current directory”. You are supposed to then use the file explorer inside VS Code to select the README.md and modify it.

    This may not work as intended in WSL. If you enter which code and there is no output it won’t work. Is there any reason why you are using WSL instead of just installing git for Windows? It comes with a terminal emulator, so there should be no problem following the tutorial and you can eliminate WSL as a possible friction point.

    • TheViking@nord.pubOP
      link
      fedilink
      English
      arrow-up
      1
      ·
      12 days ago

      Thank you very much. I shall try tomorrow again. If WSL is not required, l won’t use it tomorrow. Now that l have installed git for windows, this entire work can be done on the terminal of vs code ?

      • Muehe@lemmy.ml
        link
        fedilink
        English
        arrow-up
        2
        ·
        12 days ago

        Theoretically yes, but I would recommend the terminal git brings with it. You should be able to just open any location on your drives, right-click, and select “GitBash here”. This will start a terminal with the directory you were in as the working directory.

    • TheViking@nord.pubOP
      link
      fedilink
      English
      arrow-up
      1
      ·
      11 days ago

      I’ll be honest with you, don’t use VS code, you’re not ready for it. All you need right now is quite literally a regular windows terminal and a basic IDE. notepad++ or sublime text. ONCE you’ve learned the basics you can go back to VS Code, that VS Code terminal is gonna mess you up.

      I know that its MS. Once i have mastered it, i would switch over to Kate.

      • Muehe@lemmy.ml
        link
        fedilink
        English
        arrow-up
        2
        ·
        11 days ago

        I think you replied this in the wrong thread, but I generally agree with this person. Use GitBash as the terminal and only use VS Code as an editor (or even skip VS Code entirely). Not because it’s MS, but just because it adds complexity you don’t need while learning.

        By the way, if you just want to learn git you can try this website, it’s a fully self-contained learning experience with a terminal emulator inside the browser: https://learngitbranching.js.org/