I have the following problem with my ZF2 project.
Before I ask my question, I would like to inform you that I'm not familiar with Git and used to work with Subversion for years. For this project I want to use Git, because ZF2 is using this and after some reading the suggestion is to prefer Git over Subversion.
The project is based on Zend Framework 2. ZF2 uses a git repository. I don't remember exactly, but when I started the project I just "cloned" the zf2 skeleton application into my webfolder and then I started writing my own modules.
My actual question is: How can I use my own (private) git repository (hosted on bitbucket.org) without interfering with the git repo zf2 uses?
I think I could follow one of these approaches:
I just commit everything (including all the zf2 files) to my own repository. Every once in a while I update zf2 to a newer version. Obviously the files then have changed, and I commit this to my own repository. If I want to do this, I think I should delete the .git folder in the root directory of the project.
I commit only the three folders that actually get changed by me, and I ignore the rest (using .gitignore?). So my commits would only contain my own modules, configuration and public files. The zf2 files are not even present in my repository.
Somehow both of these approaches seem weird to me and it seems to me that I am thinking to much in a Subversion way.
My questions are:
- Is there anyone who can tell me what would be the best way to do this?
- What is the best way to keep zf2 up to date if I have the project in my own repository?
I found this thread on stackoverflow which related with my problem. Any help would be appreciated. This is my first question on stackoverflow.