什么是将 Xampp Code Igniter 3 + MariaDB 项目推送到 GitHub 的理想方法?

huangapple go评论69阅读模式
英文:

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

问题

我正在使用Xampp、Code Igniter 3和MariaDB进行我的第一个项目。

该项目在我的计算机上运行良好,但我想正确地将该项目上传到GitHub。

正确地意味着:

  • 上传项目的所有(且仅有!)必要文件(以便在其他人的计算机上运行)。

我相信(但我可能错了),项目的所有必要文件都在这两个文件夹里:

数据库文件:xampp/mysql/data/order_system

Code Igniter文件:xampp/htdocs/ci/order_system

我的主要问题是:我应该只上传这两个主文件夹到GitHub吗?然后呢?我最好应该告诉别人将文件夹粘贴到哪里,项目才能正常运行?

还是我应该上传整个xampp文件夹?(我相信这不是情况,哈哈)

还是我应该上传整个xampp文件夹结构,但只上传这两个主文件夹(order_system)里面的内容/文件?

背景信息:我对Git/GitHub知识了解很少,这是我第一个CI+Xampp项目。

英文:

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.

答案1

得分: 0

我很抱歉,如果问题让你感到困惑。我在解释时缺少一些重要的git/github理解。

但无论如何,我已经通过以下4个主要步骤找到了解决方案。

  1. 在github上创建了一个仓库,并将其链接到xampp\htdocs\codeigniter3\文件夹内。

  2. 在项目的文件夹内,我放置了所有应用程序文件(如index.php,应用程序文件夹和文件,composer.json等)。

  3. 对于其他资源,比如数据库,我在我的主项目文件夹内创建了另一个名为assets的文件夹。然后,我放入了运行项目所需的必要文件(例如,包含所有必要查询的.SQL文件)。

  4. 在github的README文件中,我列出了在assets文件夹内运行.SQL查询的指令,并列出了使用的所有技术(这样就不会混淆使用了哪个数据库或xampp/php版本)。

我不确定这是否是最佳方法,但根据我的需求和对这个主题的研究,这就是我想出来的解决方案,而且它是一个可行的解决方案。

英文:

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.

huangapple
  • 本文由 发表于 2023年3月31日 20:36:00
  • 转载请务必保留本文链接:https://go.coder-hub.com/75898595.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定