Skip to content

Starting Symfony Project: Git Repo

First of all, create a repo on gitBare

ssh gitBare
cd repos/<clientname>
git init --bare <reponame>

Then set up a repo on BitBucket

Create repo

You need to make sure you set the correct Owner if it is a client with a team

By default it will set edmondscommerce as the owner however this is not always correct, it might be

Then set up the post receive hook on gitBare to push to bitbucket, eg

ec@gitBareRepos cat hooks/post-receive
#!/usr/bin/env bash

bitbucketSlug="git@bitbucket.org:<team>>/<reponame>.git";
echo "Background bitbucket sync to $bitbucketSlug"
nohup bash /home/ec/bitbucket-sync.bash "$bitbucketSlug" &> /dev/null &

Locally clone the repo into a local container