How do you manage 3rd person git repositories in your project? (ex. Twig/Assetic/..)

I’ve made a personal light framework in PHP which matches my needs for a framework.
I’m using different 3rd party libraries, like SwiftMailer, Twig, Assetic, Facebook PHP api, …

How do you manage these sources codes from 3rd party libraries?
Do you add it as a submodule into your project, and just do a pull to get the latest version?
Or do you just copy the code into your project dir and do the updates yourself?

  • DAG vs. tree using Git?
  • Mechanism behind packed files
  • Where are the git stash elements stored? Is the data structure really a stack?
  • Most code repositories are structured like this:

    • docs
    • src
    • tests

    So in my framework dir it looks like this, and us the vendor dirs as submodule from a remote project:

    • docs
    • src
      • vendor
        • Assetic (clone of remote repo)
        • src
    • tests

    Is this the way to go? Or how do you suggest doing this?
    During a capistrano deploy, all the submodule repositories will be pulled from the remote servers.

    Edit: I must say that I use the framework as submodule in other projects. So the framework is a submodule in a project, and the framework itself also has submodules in it..

    Thanks!

  • How do I remove a file that was checked in a few commits back using Git?
  • The project disappear from gitweb after a git push
  • Mac OsX: Git don't open Araxis on git mergetool command
  • Can Git push / pull over the internet to distributed repos?
  • Jenkins Artifactory Plugin: Updating to the Latest Snapshot on Git
  • git command - filtering commits while pushing
  • 2 Solutions collect form web for “How do you manage 3rd person git repositories in your project? (ex. Twig/Assetic/..)”

    I generally use a vendor folder, either top-level or under src or lib that holds the submodules, and use the the --recurse-submodules option when pulling, and --recursive with git submodule update and git submodule status. I think capistrano can handle this use case decently, but I’m not familiar enough with it to know for sure.

    I manage every project separetaly.
    Every project folder could contain all files for correct build – so all referenced files is included in “refs” directory. In this case is build easy: get latest version of “src, refs & build” directory, run the build script. The output is in “bin” directory.

    The “refs” folder is consuming the disk size, but it’s much simpliest than managing cross-project references with correction versions (and branches).

    • 3rdParty-Project-A
    • 3rdParty-Project-B
      • src // source code & resources
      • refs // referenced binaries in correct version
      • build // build script
      • bin // builded binaries & related files
      • deploy // files used for deploy (setup.exe, setup.msi, etc…)
      • … other folders …
    • MyProject-A
    • MyProject-B
      • src
      • refs
        • 3rdParty-Project-B // there are referenced files from 3rdParty-Project-B
        • MyProject-A // there are referenced files from MyProject-A
      • build
      • bin
      • deploy
    Git Baby is a git and github fan, let's start git clone.