Movatterモバイル変換


[0]ホーム

URL:


Skip to content
DEV Community
Log in Create account

DEV Community

Cover image for How to create a global .gitignore file
Thomas Rigby
Thomas Rigby

Posted on • Originally published atthomasxbanks.com on

How to create a global .gitignore file

Unfortunately, this has happened to the best of us at some point, amirite?!

Screenshot of GitKraken showing a new git ignore file and 30,383 deleted files in the node modules folder

Inspired by this monstrosity, I decided to do some investigation!

Here is how to create a global.gitignore file to define a list of rules for ignoring files inevery single Git repository on your computer…

  touch ~/.gitignore_global  echo node_modules >> ~/.gitignore_global  echo .DS_Store >> ~/.gitignore_global  echo .vscode >> ~/.gitignore_global  git config --global core.excludesfile ~/.gitignore_global
Enter fullscreen modeExit fullscreen mode

For more handy git tips:RTFM 😉

Top comments(0)

Subscribe
pic
Create template

Templates let you quickly answer FAQs or store snippets for re-use.

Dismiss

Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment'spermalink.

For further actions, you may consider blocking this person and/orreporting abuse

When I'm not building things for the internet, I take photos of stuff. Code Janitor. 1x Engineer.
  • Location
    Manchester, UK
  • Pronouns
    he/him/his
  • Work
    Senior Developer
  • Joined

Trending onDEV CommunityHot

DEV Community

We're a place where coders share, stay up-to-date and grow their careers.

Log in Create account

[8]ページ先頭

©2009-2025 Movatter.jp