In one of my university projects I'm in a group of 4 developers tasked with developing a web application from scratch. We all have a very basic understanding of Git and decided to go with it for code base collaboration, we have a repo set up and everyone is a collaborator on GitHub.
For the last couple of months we've simply been cloning and committing to/from the master branch, and this has worked out fine. Lately however, there have been times where two or more people are working on the code base at one time and we often end up with some people being behind on commits and having to clone the repo before committing, which sometimes ends up in their changes being lost.
Today, one of the group members talked about having a "development" branch, which we all clone and commit to, and then merge into the master branch at the end of each sprint. We tried this, but didn't really see an improvement as we're still all working from the same code base, so the same problem as before occurs.
Someone else had the idea of forking (this is something new to me) the main repo, working on it and then sending pull requests to the main repo, which can then be merged in. This in practice sounds like a good plan, because the changes can be reviewed and fixes made if it breaks the code. That's how I understand it, anyway.
But as I said, we're all pretty new to Git and have a very basic grasp on the whole idea. What's the standard way of organising a team of 4 developers working on a Git repo? I've had a look into some of the Git documentation but it's all rather confusing for someone who only really knows how to clone and commit to a master branch.
Thank you for any help!
You need to look into Git Workflow, and/or branching models. There are many, and here is one to get started:
A successful git branching model
You need to think about the notion of releases, staging, production and so on, because that can be easily represented. It's basically all about organization.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With