How to use git with Symfony 2?

Viewed 6895

I installed Symfony 2 with Composer (following the 'master' guides), and it created this .git/config file:

[core]
    repositoryformatversion = 0
    filemode = true
    bare = false
    logallrefupdates = true
[remote "origin"]
    fetch = +refs/heads/*:refs/remotes/origin/*
    url = git://github.com/symfony/symfony-standard
    pushurl = git@github.com:symfony/symfony-standard.git
[branch "master"]
    remote = origin
    merge = refs/heads/master
[remote "composer"]
    url = git://github.com/symfony/symfony-standard
    fetch = +refs/heads/*:refs/remotes/composer/*

I don't want to interfere with what Composer did here since I don't know how it works, and I want to be able to update the vendors in the future.

So how do I add my own repository for 'myapp' and commit/push to it? I usually do 'git remote add origin ...' and only work with that, but now there are two repositories in the file, plus the one I need to add.

UPDATE

I installed Symfony2 with this command:

$ php composer.phar create-project symfony/framework-standard-edition myapp

This created myapp/ and installed Symfony2 + dependencies. But now composer.json does not look like it's ready to use for my project, it looks like my project is Symfony2 itself (I think):

{
    "name": "symfony/framework-standard-edition",
    "description": "The \"Symfony Standard Edition\" distribution",
    "autoload": {
    "psr-0": { "": "src/" }
    },
    "require": {
    "php": ">=5.3.3",
    "symfony/symfony": "2.1.*",
    "doctrine/orm": "2.2.*",
    "doctrine/doctrine-bundle": "dev-master",
    "twig/extensions": "dev-master",
    "symfony/assetic-bundle": "dev-master",
    "symfony/swiftmailer-bundle": "dev-master",
    "symfony/monolog-bundle": "dev-master",
    "sensio/distribution-bundle": "dev-master",
    "sensio/framework-extra-bundle": "dev-master",
    "sensio/generator-bundle": "dev-master",
    "jms/security-extra-bundle": "1.1.*",
    "jms/di-extra-bundle": "1.0.*"
    },
    "scripts": {
    "post-install-cmd": [
        "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap",
        "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache",
        "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets",
        "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installRequirementsFile"
    ],
    "post-update-cmd": [
        "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap",
        "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache",
        "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets",
        "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installRequirementsFile"
    ]
    },
    "config": {
    "bin-dir": "bin"
    },
    "minimum-stability": "dev",
    "extra": {
    "symfony-app-dir": "app",
    "symfony-web-dir": "web"
    }
}

Master Guides

1 Answers
Related