There are four of us working together on a small app, and we made a bitbucket repository.
We want to do pull requests, so should we be cloning the repository on our individual machines (git clone https://....com
) and then making a branch for whatever we work on? For example, if my friend is working on building the facebook login page, should he fork the repo and then do the work there, or clone the main repo and then git branch fb-login
, git checkout fb-login
, and then commit? Then, push to fb-login and create a PR?
Thanks
If there is one project upon which there are many team members working then every team member should clone the main repo.
You should identify a develop branch. In context of this question, a develop branch would be one where all team member's changes will be merged, release testing will be done on this branch and finally code will be pushed to master branch from this develop branch
Once they have cloned it, they should each take out a branch from develop branch. Each team member should work on their private branch.
After developing the features in private branch developers will make pull request to develop branch from their branch.
Some reviewer will merge these changes to develop branch. Ideally, no one should directly make changes into develop branch.