How to use Git with EB CLI and Composer

Hello, I’m trying to set up a work environment which I can use for collaborative work along with 2 other developers.

Problem is keeping track of it using Git, because with EB CLI I can only do a Push/Deploy. So I’ve setup an account on Bit Bucket, but the problem is how do I set it up so that the other person can use it as well?

We are using Symfony, so using the instructions provided on AWS docs, I’ve set up an environment for myself and I’ve added remote repository on Bit Bucket.

However when I’m trying to set it up on other persons computer the problems start… If I first setup the Symfony with composer and EB, then Git doesn’t want to do a Pull because files will be overwritten, if I make a commit before that, it still complains that files need pruning or that there are too many changes, that I need to do merge manually… etc etc…

Can someone please explain to me how I can resolve this so that we can all work on this together and use git to share changes with each other?


Related discussions:

It sounds like you need to learn how git works first and how you collaborate using it. There’s tons of info about git work flows out there. I’d start there.

More specifically - you should be adding generated files (eg, the composer /vendor directory) to your .gitignore, to avoid git conflicts.
Also, you probably want to run build scripts (eg composer install) on the EB server. Take a look at the EB docs. I’m sure you could find a tutorial for Symfony on elastic beanstalk, too

Can you do another identical EB app setup the same way and use git branches? Then at some point frequently integrate your code to master on both applications? Or create 3 separate EB applications and use the one as the Main/integration app that you both push your code to? perform git pull and integrate your code together. There are a few other ways I’m sure. Basically you’ll want to use branching and merging.