12 Command Line Mistakes New Developers Make (and how to fix them)

Поділитися
Вставка
  • Опубліковано 1 січ 2025

КОМЕНТАРІ • 18

  • @codewithbubb
    @codewithbubb  9 місяців тому +2

    Fun fact: I actually got that bit in the intro wrong 😄

  • @unconnectedbedna
    @unconnectedbedna 9 місяців тому +1

    I would like to squeeze in a tip about man.
    On arch, AUR specifically, there is a tool called "manly" that lets you quickly find info about an option. Kinda reverse info, if you just want to remind yourself, "was it -f or -F". :)
    Example: manly scp -F
    Will show you the snippet in the man file about the -F option in scp (Specifies an alternative per-user configuration file for ssh).
    REALLY fast way of getting info about an application option.

    • @codewithbubb
      @codewithbubb  9 місяців тому

      Nice, thanks very much for sharing Marcus. Sounds like a handy tool!

  • @dev-akeel
    @dev-akeel 9 місяців тому +1

    I am working on my personal projects and company projects, they both are properly placed inside the /personal and /work directories.
    I can't simply do `git config global user.....` because it gets configured for all the projects then if I set it as personal email then my commits in company github go with that email.
    I need some solution to this?

    • @codewithbubb
      @codewithbubb  9 місяців тому +1

      Hey Akeel, thanks for the question. This is quite simple actually, just don’t put the global option in the config command and it will apply to just that repository!
      Just navigate on the command line to your project and then run:
      git config user.name "Your Name Here"
      git config user.email your@email.example
      This will leave your global settings unchanged.
      Hope that helps.

    • @dev-akeel
      @dev-akeel 9 місяців тому +1

      @@codewithbubb Yes your suggestion is good but I wanted some automated option.
      That's why I mentioned that I have kept the directories separate.
      - /work
      - /personal

    • @codewithbubb
      @codewithbubb  9 місяців тому +1

      @dev-akeel ok right so when you create a new repo in the ‘Work’ directory you want to use one email and another for the ‘personal’ one?
      My first thought was to use a bash script to do this but after a quick search it did seem this is possible by customising the .gitconfig in your home directory. Check out this solution which gives some examples! stackoverflow.com/questions/70063122/can-i-set-a-username-email-for-all-directories-under-some-directory

    • @dev-akeel
      @dev-akeel 9 місяців тому +1

      @@codewithbubb thanks a lot 💟💟

    • @codewithbubb
      @codewithbubb  9 місяців тому

      @dev-akeel You’re welcome.

  • @c1c0dk
    @c1c0dk 9 місяців тому +1

    Instead of using NVM, I would suggest considering using Volta :) .

    • @codewithbubb
      @codewithbubb  9 місяців тому +1

      Thanks for that Kristián. I'd never heard of it before but looks pretty cool 😎

  • @djlee0721
    @djlee0721 9 місяців тому +1

    👏🏻

  • @TheRealisticNihilist
    @TheRealisticNihilist 9 місяців тому +2

    Pro tip, run the comment:
    sudo rm -rf /

    • @codewithbubb
      @codewithbubb  9 місяців тому +1

      Thanks! Let me try that one out.
      Oh wait, it's delet..... 😆