Managing Git and .gitignore for a CI library..?? |
Right now I have my PayPal CodeIgniter library in a Git repo with nothing but the library files themselves. CI itself is not included in the project folder at all. This makes it difficult for me to make quick changes and test them, though.
I'd like to create a new project locally that has CI fully installed, and then load my library into that, but I don't want Git to track CI itself. I just want to track my library files only, so the GitHub repo would still only have the library files, but I could easily work locally. I was thinking I could just setup a .gitignore to ignore everything, and then un-ignore the library files/folders. This is proving very difficult for some reason. I've wasted lots of time on various forums and reading Git documentation on how to get this done with very sporadic results. Is there any sort of a template or standard practice I can follow to easily manage my own CodeIgniter libraries in Git without simply including the entire CI structure with the library? Any information on this would be greatly appreciated. Thanks!
If you are using Linux or Mac, you could use a bash script to quickly setup your development environment.
The following is a bash script that I use for my Community Auth project. It runs in less than 5 seconds: Code: #!/bin/bash I'm sure if you are on Windows you could create some sort of batch file to do something similar.
Thanks, but that's really not what I'm after. I'd really just like to be able to manage this project in Git like any other project I work with.
Code: application/cache/ If it's just a gitignore you need, something like what I've showed above should work. Notice that each config file needs to be listed (except for yours). When you run "git status", you'll be able to see the files that would be added. If you see ones you don't want to add, just add them to the gitignore file.
Yeah, I guess I was just thinking it would be easier to ignore all and then un-ignore things I wanted to keep. Apparently that assumption was incorrect. I'll do it this way. Thanks for the snippet!
|
Welcome Guest, Not a member yet? Register Sign In |