Git - Ignore files to be included on repository with .ignore file

0 votes
355 views
added Oct 31, 2017 in Git by Callum Sergeant (1,440 points)
edited Jul 11, 2019 by LC Marshal
  1. Open text editor i.e sublime text
  2. Add the folder you want to ignore by git
  3. For e.g node_modules
  4. Save the file as .gitignore
  5. Commit and push

1 Response

0 votes
responded Jul 11, 2019 by LC Marshal Captain (25,790 points)

Simply add the directry name into .gitignore files. Example as shown below:

All these files is sitting in .gitignore file

node_modules
bower_components
config-dev.json
.cache
npm-run-pull.php
property-profile-report-pdf/reports/*
home/*.json
sites/all/themes/assets/css/style.css

.DS_Store

 

lazacode.org - Malaysia's programming knowledge sharing platform, where everyone can share their finding as reference to others.
...