r/programming • • Jun 19 '15

GitFlow considered harmful

http://endoflineblog.com/gitflow-considered-harmful
13 Upvotes

244 comments sorted by

View all comments

Show parent comments

2

u/[deleted] Jun 19 '15

Wow, i wonder who wrote this line of code, i'll just git blame it

Ohh, Netzapper wrote it, let me talk to him.

VS.

Ohh, I wonder who wrote this line of code, I'll just git blame it, then grep the log to verify it's not a merge commit, if it is, git show the commit, find the parent commits and see which one is to blame for this line of code, then contact Netzapper since he wrote it.

What couldn't be simpler?!

1

u/Netzapper Jun 19 '15

Oh! In my shop that goes like:

"Wow, I wonder who is responsible for this line of code?" I'll query the requirements database to see which engineer last signed off on this module. Oh, it's giveupitscrazy... well, regardless of whether or not he wrote the code, he owns that module and reviewed it, so he's who I'll call. If he signed off on somebody else's code, it's okay, because he must understand it, or he wouldn't have signed off on it.

1

u/[deleted] Jun 19 '15

so you basically recreated git blame to work around the faults of git merge then wonder why people use git rebase, it now makes perfect sense, your comment was completely out of ignorance.

1

u/Netzapper Jun 19 '15

so you basically recreated git blame to work around the faults of git merge then wonder why people use git rebase

Nooo... I "recreated git blame" [sic.] to satisfy the FDA. I'm extremely suspicious of rebase because I'm concerned the FDA will consider that tampering with the audit trail.

your comment was completely out of ignorance.

That is true. I've used git for years, with a variety of workflows and teams (in games and medical devices), and I've never seen any need for rebase. The arguments I've always heard were related more to aesthetics than utility.

You've demonstrated that it does have some utility. It just seems like not much gain at all, given how many people fuck up the rebase merge.

1

u/[deleted] Jun 19 '15

interesting. I also work with a government organization, AFAIK they don't care so much about our history as they do about what actual code changes we make.

Granted, it's a completely different line than FDA, but you'd think they would all adhere to some similar practices.

1

u/Netzapper Jun 19 '15

AFAIK they don't care so much about our history as they do about what actual code changes we make.

That's where I'm coming from. Aside from rolling back a fairly fresh commit, or bisecting a bug so that we can fix it in next release, I've never seen anybody go back in time with git or any other version control. Ever. Who cares how tangled your branch graph looks on github?

But we use git history to prove that no 3rd party has interfered with the code, that the code we're working on and documented is the code we've built, and that the artifacts we've built are the ones we've shipped. When we freeze versions for release, we have to support that version. So we branch on release, and fixes are manually backported, because each release is more or less a separate medical device. Think Version 2 of your hip prosthetic; shouldn't that be scrutinized with a similar process as Version 1?

If my guys wants to use rebase locally to squash commits before pushing them, and nobody knows it's happening... meh, whatever. But rebasing out merge commits makes me uneasy.