How to ignore files and folder globally in git?
Image Source: Picsum

Every time we work in an existing/new project IDE and operating system keep creating multiple files and we need to handle them in every. By **using global git ignore **file we can globally ignore this and save some time.

Add the global config file in Mac or Linux:

  1. Fire your terminal
  2. Run touch ~/.gitignore_global - this will create global .gitignore file in your home directory.
  3. Add some values that you would like to always ignore. 
  4. Run git config –global core.excludesfile ~/.gitignore_global. According to this page at git-scm.com{: target="_blank"} this command will make all the patterns from ~/.gitignore_global ignored in all situations.

Done !!

The SQL Whisperer

The SQL Whisperer

Senior Backend Engineer with a deep passion for Ruby on Rails, high-concurrency systems, and database optimization.

8 Things That Are Making Your Website Slow
Prev post

8 Things That Are Making Your Website Slow

Next post

Running Redis Server Using Docker Container

Running Redis Server Using Docker Container