News for hackers. Stuff that matters.
Re:A simple git branching model by sanderjd on Friday September 27, 2013 @10:44AM (#6457243)
I see both sides of this, but on my own team, where we are all meant to be experts on the project, I really like to be able to see the experiments, because there's a reasonable chance I'll be trying something similar to or perhaps inspired by those throwaway experiments at some point. I think there is a different trade-off in open source projects, where it's more helpful to have a history that isn't confusing to newcomers.
Re:A simple git branching model by phillmv on Friday September 27, 2013 @11:39AM (#6457518)
I end up with a lot of "Interim commit on foobarbaz" because I'm leaving work and want to push my code just-in-case. Refolding those into "foobarbaz: feature 1" is a lot nicer.
Re:A simple git branching model by dreamdu5t on Friday September 27, 2013 @07:19PM (#6460157)
The central repo is not meant as a place to backup your working tree. That's the point of git stash, and local branches. If you're worried about losing your working tree, back it up!
Re:A simple git branching model by Daishiman on Friday September 27, 2013 @02:18PM (#6458588)
Then have them push the experimental branches and perform the rebase on a temporary branch, but it's still no excuse to have a clean feature history.
Re:A simple git branching model by sanderjd on Saturday September 28, 2013 @12:02AM (#6460885)
I think I wasn't clear. I like to be able to see completely experimental entirely thrown-away approaches in branches like you suggest, but I also like to see the little hints of partial experiments that a "dirty" history shows. My point is that on projects with focused teams where everybody is or should be an expert, literally the more history I can access, the better. Things like "did somebody already try and fail to refactor this class? What was there approach? Can I actually do better, or am I just headed down the same rabbit hole?" are invaluable to me, and the best way to answer those questions is to see "dirty" remnants of things people have tried and un-tried in the history. History can be forensics, and in forensics you don't want things to be "clean".
Re:A simple git branching model by saraid216 on Friday September 27, 2013 @02:38PM (#6458696)
I used to do this, but I've started using

  git checkout master
  git diff master..featurebranch | git apply
instead.