From: brett l. <bre...@gm...> - 2012-02-01 14:32:54
|
On Wed, Feb 1, 2012 at 8:28 AM, Stefan Frey <ste...@we...> wrote: > Frederick: > I am not a git-expert myself, but you could either trust Brett who uses > git in his day-job (at least what I understood) or check some sources on > the Internet: > Correct. I've been using git on a daily basis for 3-4 years now. I recently switched employers, and now git is an even bigger part of my daily work life. ;-) > Especially this q&a on stackoverflow: > http://stackoverflow.com/questions/457927/git-workflow-and-rebase-vs-merge-questions > > Shows the workflow using rebase in the first listing (and yours in the > second). > > You still merge your features, however you FIRST rebase your new feature > on top of the master repo. > This is correct. The whole idea behind rebase is to re-align your feature branch's history so that the diff is *ONLY* your changes. That way, when you merge the branches, you're not considering someone else's work and being forced to resolve any merge conflicts for work you didn't create (and probably aren't the expert on). To do this, git rewinds your feature branch back to the common point in both branch's history, then it replays the remote branch's changes onto your feature branch, and THEN it re-applies your local commits on top of the new, updated history. Under most circumstances, this is a good thing. This allows you to see whether some new commits have made your local commits un-merge-able. You get to resolve the merge conflicts in your local feature branch *before* merging your local feature branch into the publicly published branches. > Maybe Brett can shed even more light on this issues (again). > > Stefan > ---Brett. > > On 02/01/2012 02:06 PM, Frederick Weld wrote: >> Not regarding this specific issue but more as a request for alignment >> regarding hotfix procedure: >> >> I'm not a GIT expert but this is what I would do to provide a hotfix >> for a release branch (1.6.x - locally available remote tracking branch >> assumed): >> >> git checkout -b Hotfix-xyz 1.6.x >> ...do changes... >> git commit -a -m "Hotfix-xyz..." >> git checkout 1.6.x >> git pull >> git merge --no-ff Hotfix-xyz >> git push >> git checkout master >> git pull >> git merge --no-ff Hotfix-xyz >> git push >> git branch -D Hotfix-xyz >> >> To me, switching to auto-rebase is very dangerous if we are working on >> several remote tracking branches and might pull from one of these >> local branches to the other. If not (or if there is only one remote >> tracking branch as for Erik), switching to auto-rebase appears to be >> ok. >> >> --Frederick >> >> ------------------------------------------------------------------------------ >> Keep Your Developer Skills Current with LearnDevNow! >> The most comprehensive online learning library for Microsoft developers >> is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, >> Metro Style Apps, more. Free future releases when you subscribe now! >> http://p.sf.net/sfu/learndevnow-d2d >> _______________________________________________ >> Rails-devel mailing list >> Rai...@li... >> https://lists.sourceforge.net/lists/listinfo/rails-devel > > > ------------------------------------------------------------------------------ > Keep Your Developer Skills Current with LearnDevNow! > The most comprehensive online learning library for Microsoft developers > is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, > Metro Style Apps, more. Free future releases when you subscribe now! > http://p.sf.net/sfu/learndevnow-d2d > _______________________________________________ > Rails-devel mailing list > Rai...@li... > https://lists.sourceforge.net/lists/listinfo/rails-devel |