How to Create & Use GitIgnore File Properly, Quickly & Easily

Поделиться
HTML-код
  • Опубликовано: 14 мар 2021
  • - How to use gitignore file
    - Why we use gitignore file
    - What are benefits of gitignore file
    - Why gitignore is important
    - Which tech stack uses gitignore file
    - How to use gitignore generator tool
    - How to create gitignore file
    - What to do in case of gitignore not working
    - Which one is gitignore directory
    - How to add files to gitignore
    - How to create gitignore file
    There is a . before gitignore in the file name. Its like a system file or hidden file. When we use package managers, such as Yarn package manager or npm package manager, we install project dependencies. Project dependencies bring their own dependencies. All of it is kept in a folder called node_modules in case of nodeJS.
    Node Modules folder grows with time. Packages or dependencies get old and obsolete as new versions of packages are released. Project uses packages as it needs. Package.json file keeps record of dependencies that we have installed for our project. By using npm or Yarn, we can easily install all dependencies with a single command. Package managers scan package.json file and bring dependencies listed in package.json file. It is easy to install or uninstall packages or dependencies. This means you need node_modules during development and production. If you are not working on a project, it does not need packages, dependencies or node_modules.
    If you are not working on a project, it's taking up space in your system. If you have pushed project to github, it will just sit there and won't run. It will not need node_modules or packages while sitting in a repo at github. Almost all of those packages gonna get updates over time. So why keep old packages? Node modules folder can take up considerable hard disk space for a small project. We do not keep packages, dependencies or node_modules in our PC or at Github. We also do not share these. You only need to share or keep your project with package.json file. When you will use your project, just run an npm command to bring back all packages in their latest versions.
    So to keep node_modules folder from being uploaded to github or remote repository, we use gitignore file. gitignore file does not just keep node_modules folder from being uploaded but you can also name any other file or folder in it as well. Your project may have other private files like, log files, zip files, database migration files, env file etc. You can ignore all of these files by using gitignore. You can create a gitignore file yourself or there are gitignore tools that can generate boilerplate for any tech stack.
    Thank You!
    Channel Support
    👍 LIKE VIDEO
    👊 SUBSCRIBE
    🔔 PRESS BELL ICON
    ✍️ COMMENT
    Channel: / webstylepress
    Website: www.webstylepress.com
    FaceBook: / webstylepress
    Twitter: / webstylepress
    Instagram: / webstylepress
    LinkedIn: / webstylepress
    GitHub: github.com/webstylepress
    #git #gitignore #nodejs #WebDevelopment #WebStylePress

Комментарии • 9

  • @marcelczowalla1030
    @marcelczowalla1030 2 года назад +1

    Thanks a lot, I struggled to find the correct way to implement line!

  • @ad3rinto
    @ad3rinto Год назад +1

    Thank you for this. Just what I needed. Straight to the point and easy to follow.

  • @ayushpathak3011
    @ayushpathak3011 2 года назад +2

    Easy to understand and to the point! Thank you : )

  • @purvakothari8389
    @purvakothari8389 3 года назад +3

    Good work man. You made it so easy.

  • @harithzainudin9594
    @harithzainudin9594 2 года назад +2

    nice. easy to understand! thank you :)

  • @VISHNUKUMAR-bh8uj
    @VISHNUKUMAR-bh8uj 3 года назад +3

    Thanks for this video

  • @satyasridevi851
    @satyasridevi851 2 года назад +2

    learn the purpose of ,gitignore file. thank you

    • @JavedKhalil
      @JavedKhalil 2 года назад +3

      The purpose of gitignore files is to ensure that certain files not tracked by Git remain untracked.

  • @Proviper666
    @Proviper666 Год назад

    Deam. I understand. I made file copied something inside it. I hope it works.