Search code examples
phpcodeignitergithubmariadbxampp

What is the ideal way to push a Xampp Code Igniter 3 + MariaDB project to github?


I'm working on my first project using Xampp, Code Igniter 3 and MariaDB.

The project is working fine on my machine, but I would like to correctly upload this project to github.

And by correctly I mean:

  • Upload all (and only!) the necessary files of the project (to run on someone else's PC).

I believe (and I might be wrong) that all the necessary files for the project are inside these two folders: Database files: xampp/mysql/data/order_system Code Igniter files: xampp/htdocs/ci/order_system

My main issue is: should I upload only those two main folders to github? Then what? I ideally should instruct where someone should paste the folders for the project to work?

Or do I upload my whole xampp folder? (I believe it's not the case, LOL).

Or do I upload the whole xampp folder structure but only content/files inside those two main (order_system) folders?

To give some background: I have very little git/github knowledge and this is my first CI+Xampp project.


Solution

  • I apologize if the question was confusing. I lacked some important git/github understanding to explain it properly.

    But anyways, I've come up with a solution by doing these 4 main steps.

    1. Created a repository on github and linked it to a folder inside xampp\htdocs\codeigniter3\

    2. Inside the project's folder, I've put all the application files (like index.php, application folder and files, composer.json etc.)

    3. For the other resources, like the database, I've created another folder inside my main project folder, with the name assets. Then, I've put the necessary files to get the project running (for example, the .SQL with all necessary queries).

    4. In the github README file, I've listed the instruction to run the .SQL query inside the assets folder, and also listed all the technologies used (so there is no confusion regarding which database or xampp/php version was used).

    I'm not sure if this is the best approach, but based on my necessity and studies on the topic, this is what I've come up with and it was a functional solution.