(no title)
DavidWoof | 1 year ago
I always think about using "clean up a pull request" as a fizzbuzz-ish screen in interviews. It just seems like a decent proxy for "do you care at all?".
DavidWoof | 1 year ago
I always think about using "clean up a pull request" as a fizzbuzz-ish screen in interviews. It just seems like a decent proxy for "do you care at all?".
actinium226|1 year ago
The issue is in submitting an MR/PR with those commits. There's an expectation among professionals that you make your work presentable before submitting it for review, although those who are new to the profession don't realize that this cleanup step is necessary (how could they? the intro courses don't teach this and they're usually struggling enough with the code).
I just wanted to throw this comment in here in case some newbie sees this and comes away thinking "oh, I can't have 'temp' or 'checkpoint' in my commit messages"
taberiand|1 year ago
I partly blame the excessive fear mongering around rebasing, where the strict Never Rebase a Pushed Branch rule is drilled into them and they never learn why or when they can break the rule safely.
So it's an uphill fight but I just try to teach by demonstrating, frequently, exactly how they can tidy up for the merge request.
hyperbolablabla|1 year ago
tornadofart|1 year ago
It all has trade-offs.I prefer seeing the dirty laundry.
Cthulhu_|1 year ago
keybored|1 year ago
We can sling around stereotypes of people failing and doing a bad job with their strategy. Then going to cry to someone (presumably you?). But I don’t think that advances the conversation.
Cthulhu_|1 year ago
Blackthorn|1 year ago
aulin|1 year ago
Merging is for keeping track of a group of commits that has been taken from a feature branch and included in the mainline. Why would you clutter the feature branch with periodic main merges when you can cleanly rebase it and keep it tidy?
7bit|1 year ago
Ist it really? If you would See my uncleaned history, it would take you days to understand what I was even trying to do.
Your statement seems based on the assumption that someone knows how to achieve a particular thing right from the start. But that isn't always the case and there might be a lot of different approaches until the correct or best one is found.
Do you really want to review dead code that's somewhere in the commits of a feature branch?
CRConrad|1 year ago
Oh, and here I though this discussion was about git. But you're talking GitHub.
keybored|1 year ago
Based on?
mettamage|1 year ago
scott_w|1 year ago
Because the reality is, when it comes to Git history, no, I don't care in the slightest. I get all the information I need by:
- Reading previous PRs (the final diff)
- Checking the name on a git diff of a line
- The ticket reference
Git commits are a tool to help me write code and reverting to a "known-good" state. Once it's merged into master/main, I don't care how messy it is because 99.999999% of the time, I'll just go back to the merge commit.
keybored|1 year ago
But it takes surprisingly little to sell back centralization and lock-in to developers, even when working on top of a decentralized tool.
mandeepj|1 year ago
Have you set those expectations with your team or the people you are working with? Your ‘style’ shouldn’t just show up in reviews
McBun|1 year ago
We had various lectures on languages models, math, algorithms, networking... absolutely nothing on git (I did my classes between 2008 and 2013, things might have changed now)
lerax|1 year ago
that just kinda sad. hopeless.
Cthulhu_|1 year ago
A commit should be atomic; it should be a complete change with code and tests all adjusted, and ideally a message explaining what and why it changes. (In practice / in my line of work this doesn't happen because it's all front-end code implementing some poorly documented user story in jira, but hey).
If I'm ever involved in hiring again I'll add git usage to my list of criteria. Along with whether they can actually touch type. I can't believe that the standards have dropped so far that basic computer skills are no longer necessary apparently.
keybored|1 year ago
Like merging main back into your feature branch: just rebase. But then you often need to re-do conflict resolution. You have git-rerere but, eh, it’s not discoverable at all. But let’s say you get over that hurdle. Now the next obstacle is the “never rewrite shared history”. And if you’re in a “corporate” environment chances are that you publicize your branch when you make a PR. And it can take a few days to get approval.
Now I care. But sometimes I have doubts about whether the caring is well-founded. Exactly because sometimes people around me seem to care not one bit.
unknown|1 year ago
[deleted]