Starting Symfony Project: Git Repo

First of all, create a repo on gitBare

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

Then set up a repo on BitBucket

https://bitbucket.org/repo/create

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

1
2
3
4
5
6
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