Wondering what's a proven way for handling git workflow for small 5-6 member team. Should we keep developing in a separate branch and then merge with master once a day? Also how do you handle pull requests (branch to branch)? Any suggestions or opinions?
Thanks!
Depending on whether you're working on existing software or startups - if it's a startup where there's no software, we often work directly on master until we have something stable.
Once you have software that's deployable, for each new feature / bug fix, create a feature branch. Once your feature got enough upvotes (we use Gitlab which has a +1 / -1 feature), deploy that branch, test it, then merge into master. If you're doing a lot of small fixes / features, the amount of effort to make a branch for each is sometimes too much, so we would sometimes just do a large batch of small features in a branch instead of a branch for each.
Once you do a release, tag master with the date and time so that if something is catastrophically broken which slipped through the tests, you can switch to a previous tag.
Recommended tools, Gitlab. We're currently investigating the benefits of Upsource + Hub + YouTrack + TeamCity, it looks promising and can enforce certain workflows which is somewhat more tricky to setup with Gitlab and Jenkins.
You can you have your own branches (along with a pull request) for bug fixes and features. Once the code review is complete you can merge your branches to master. You can use a plugin named git-reflow for making this process even simpler. After installing reflow, checkout to master and type git reflow start your-initials-branch-name which will create a new branch from master, this naming convention will help other to identify you branch very quickly.
Use can start working on you branch now, and after a commit you need to have a pull request, git reflow review master will open up a pull request against master with your current branch. Team members can review each others code and once they comment lgtm(Looks Good To Me) or :+1 (thumps up sign) you can merge your code to another branch(master is also a branch) using the command 'git reflow deliver master'. This will merge you local branch with master branch.
I think some apps offer things that facilitate the simultaneous cooperation. kanbantool.com is perfect for a small team, allows to share the tasks with keeping concentration on the aim.
Jakub
Web Developer
There are different workflows you can use.
Pretty common is a feature branch principle. You have the master branch, which is the stable / production banch and the develop which is the ,...development branch :D
Then you create a branch for every feature you are developing and if its finished it gets merged into the develop.
Another approach is git flow where you also keep seperate branches for your features but also for releases, bugfixes etc.
Here is a pretty good ressource Git Workflows