Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>You should not need to rebase the remote branch at the same time. Your only worry should be to keep up to date your local feature branch.</p> <p>You should do that like this if you like rebasing:</p> <pre><code>git checkout master git pull --rebase #refresh master using rebase git checkout featureBranch git rebase master #replay all changes on the feature branch on top of the master branch </code></pre> <p>If you do the above at regular intervals you will have your feature branch as a continuation of master only local.</p> <p>Now at the point you want your changes to be pushed to server on the master branch, you should do the above and only after that do:</p> <pre><code>git checkout master git merge featureBranch #because you have rebased, this will only fast forward the feature branch pointer to where the master branch pointer points to git push </code></pre> <p>That sequence will maintain a linear history if this is something you value.</p> <p>If your feature branch is pushed to the server and more than one developers are working on it, then there are two things you need to be doing: 1) Make sure you get the latest version of the remote feature branch locally at regular basis and for sure before you push any changes to the remote feature branch, 2) Make sure the remote feature branch stays up to date with master </p> <p>for the first you need to only do:</p> <pre><code>git checkout featureBranch git pull --rebase </code></pre> <p>That should happen every time you want the latest code of the remote branch and definitely before a push to the remote feature branch happens. We first pull to bring the local feature branch up to date with any changes in the remote feature branch (fixing any conflicts on the way) and the push to the server our change (now that are all nicely merged)</p> <p>for the second you need to what I describe above.</p> <p>All developers working on the feature should do the first often. I suggest assign the responsibility to one developer on doing the second at least once a day. After this developer does the update from master he/she notify the rest of the team to do refresh their local feature branches from the remote feature branch. They</p> <p>I hope that helps.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload