tags:

views:

53

answers:

2

Hi, I'm working on some feature with my co-worker. We created topic-branch. And everything is ok when we only merge everything - our branch on server with local copies and master to keep our branch up to date. But it is not ideal workflow.

Could anyone point me a better solution?

A: 

This is how I like to do it. Each of you should work on your own branch. When integrating, checkout the master branch and pull from each of your branches (where you will have added, committed and pulled the relevant changes you want to get to production).

A continuous integration server like Integrity (www.integrityapp.com) should help.

Júlio Santos
A: 

My guess is that you are doing a git pull from the server, when really what you want is git fetch. The problem is that git pull automatically merges your local branch with the remote branch that it is tracking, but git fetch does not.

The solution would be to only use git fetch, and then either git merge origin/master or git rebase origin/master (replace master with the actual branch name) afterward, depending on what you want the history to look like.

Jonathan