I'm busting my head trying to figure what is the right way to work with GIT. I thought I figured it, but lately we had some problems. Here is my situration, really hope I get a simple solution for my problem.
2 persons (call them A & B) working on the same project.
A is doing less development, but he is incharge on reviewing B and push code to production.
B doing most of the development, but cannot push to production, need A to review and approve his code.
Until now we worked like this:
A is working on 'master'.
B is working on branch 'dev' - dev is a remote branch, B is pushing changes to it, A can pull from the remote branch.
A is making changes directly on 'master' (which are pushed to production). When B is done with a feature, A is merging 'dev' to the master (git checkout dev; git pull; git checkout master; git merge dev)
B is working only on 'dev' and tell A when to merge. If A made a change on master, B is rebasing (git checkout master; git pull; git rebase dev; git checkout dev)
This seem to work fine (and we assume it's a correct way to work), but somehow, even after A merged, and B rebased, 'dev' was not equal to 'master'.
What are we doing wrong, is there a different method/workflow we should use for our needs?
- Note: 'dev' must be remote branch, because sometimes A helps B with problems and 'dev' is also pushed to online test server so other people can test.