[TYPO3-v4] Git: what to do when a branch "diverges"?

Peter Niederlag typo3-list at niekom.de
Tue Mar 8 11:38:12 CET 2011


Hello,

Am 08.03.2011 10:39, schrieb Ernesto Baschny [cron IT]:
> François Suter schrieb am 08.03.2011 09:43:
[...]
> Please note that I am *not* (yet) a git expert, so someone might want to
> correct me.

perfect explanation! :->

 > It has been told that "rebase" is dangerous (as it rewrites
> history, in this case the commits "A" and "B" are rewritten), but in
> this tiny bug fixes I find it convenient. Probably more dangerous if you
> are working on a huge feature which includes fixes which already been
> committed to origin/master. To quote a site [1]:

- rebase changes commits, so to the purists this is dangerous
- If you ever rebase (change a commit) that is already public, or some 
others work is based on it, then you will run into trouble.

Gerrit patch sets are constantly updated/rewritten, rebase is a perfect 
way to perform that.

Unless you really work on a series of commits/complex new feature you 
most of the time really always want to keep your patch applied to the 
tip of a branch, that's exactly what rebase is doing.

So, dont worry too much, rebase can be dangerous but is also used very 
frequently and very helpful.

Greets,
Peter
-- 
Peter Niederlag
http://www.niekom.de * TYPO3 & EDV Dienstleistungen *


More information about the TYPO3-project-v4 mailing list