troubleshooting Question

How to use ignore everything but the files/folders I want in Git with gitignore..??

Avatar of Andrew Angell
Andrew AngellFlag for United States of America asked on
PHPGit
6 Comments2 Solutions685 ViewsLast Modified:
I have a CodeIgniter PHP library that I maintain.  I do not distribute all of the CI platform with the library.  I only distribute the library files themselves.  The thing is, the library files are scattered through the whole CI structure.  

As it stands now I have a git repo that simply has nothing but the library files in it, so I do my code adjustments in a separate location where CI is fully installed and then I have to copy over to my "library only" version of the files to submit into Git.  This makes the work flow cumbersome.  

What I need to do is ignore everything in the CI structure so that it doesn't get tracked except for my library files, which consist of:

application/config/paypal-sample.php
application/controllers/paypal/*
application/libraries/paypal/*
application/models/paypal/*
application/views/paypal/*

Everything else in the project should be ignored by Git.  Any information on how I can accomplish this would be greatly appreciated.  Thanks!
ASKER CERTIFIED SOLUTION
Andrew Angell
Co-Owner / Developer

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 2 Answers and 6 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 2 Answers and 6 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros