716
Always commit (lemmy.world)
top 31 comments
sorted by: hot top controversial new old
[-] chickenf622@sh.itjust.works 101 points 1 year ago

He doesn't want to push at such a late hour. Give him a break.

[-] superduperenigma@lemmy.world 46 points 1 year ago

Gotta have something to say in stand-up the next morning, otherwise your PM will assign you another task.

[-] eestileib@sh.itjust.works 37 points 1 year ago

How many times did I push at 2am so I could go home, get to the freeway entrance, realized I fucked something up, sighed, and turned around to go back and fix it...

(This was like 1999, we didn't have access to Perforce from home).

After a year or so I realized I should just develop the willpower to check it in after sleeping on it.

[-] jaybone@lemmy.world 7 points 1 year ago
[-] eestileib@sh.itjust.works 2 points 1 year ago

"P4 server's down."

"Sports Page, or Tied House?"

[-] yiliu@informis.land 82 points 1 year ago

"No, wait, it's not what you think! There's a continuous integration system, a commit would've triggered a new build! It might have paged the oncall! Babe! The test suite has been flaky lately!"

[-] Cqrd@lemmy.dbzer0.com 70 points 1 year ago

Dude just stopped before he got to a logical stopping point where it would make sense to commit and push

[-] GigglyBobble@kbin.social 59 points 1 year ago* (last edited 1 year ago)

That's actually not that rare when I work later than usual. Some stupid problem my brain is too fried to solve. Eventually I give up, feeling defeat for the whole evening and solve the problem in 10 mins the next morning. Get enough sleep, people.

[-] sunbeam60@lemmy.one 29 points 1 year ago

However, much research shows the hand banging against the wall period is required for you to achieve the morning breakthrough.

The sleeping break is where your neurons form new connections based their activity yesterday. The “thinking hard” and the frustration is a required part of the morning epiphany.

God I love programming.

[-] GigglyBobble@kbin.social 5 points 1 year ago

Thanks. I did not need to know that. Oh well, off to more headbanging then.

[-] min_fapper@iusearchlinux.fyi 42 points 1 year ago

The most common advice for git is

commit early. commit often

Do not however, follow the same advice for relationships.

[-] ______@lemm.ee 41 points 1 year ago

I worked today and have O commits.

[-] devious@lemmy.world 36 points 1 year ago

Well maybe if she had shown more interest in his pull requests, he wouldn't be off forking other repos!

[-] Zeth0s@lemmy.world 33 points 1 year ago* (last edited 1 year ago)

I never push as last thing in the evening. I want to sleep over it and revise in the morning. --amend crew unite

[-] Anticorp@lemmy.ml 8 points 1 year ago

You should be pushing feature branches as you work on them, so if you have a crash or something, your work isn't lost. Builds should be triggered from pull requests on the main branch, if triggered by anything. You should never push directly to main. At least that's my preference.

[-] Zeth0s@lemmy.world 5 points 1 year ago* (last edited 1 year ago)

Our ci/cd pipelines build also feature branches. I do push often, clean code. I don't push when I am tired enough that I can't trust my judgment that the code I am pushing is over my personal quality threshold. I add meaningful, concise commit messages. These are my rules.

[-] TheManuz@lemmy.world 2 points 1 year ago

I make WIP branches only for that purpose, so I can push half done work and rework it the day after.

This means a lot of history changes, but only in the WIP branch.

When history is clean, I rebase the feature branch.

Is this a good practice? I never found a better way to backup partial code.

[-] Michal@programming.dev -1 points 1 year ago

What if while you sleep over it your laptop gets stolen or damaged? I'd rather push every small change than sit on it.

[-] Zeth0s@lemmy.world 5 points 1 year ago* (last edited 1 year ago)

I would lose max 3 hrs of work that I already know how to re do. I can live with that. I don't want to publish too much unfinished/unpolished work. There is always the chance someone might need the branch.

Even if drafts under development, I like to publish something that reaches the standard of my "best" me, not my "Friday evening" me

[-] Michal@programming.dev 2 points 1 year ago

Why not? Do you push directly to master?

[-] Zeth0s@lemmy.world 0 points 1 year ago* (last edited 1 year ago)

Because someone else might need to work on something on or from my branches. And I don't want garbage in my history. There are cases I might not be able to squash merge, so all my history will be in the project history. I want each commit to be clean. It is not a lot of effort, and forces me to increase code quality, because I review my code more often.

Rules for all projects I manage: never rebase published branches and always publish clean code (even implementation is unfinished).

From experience following these simple rules make the whole project management easier and more effective

[-] explodicle@local106.com 1 points 1 year ago

Same here. At least for me, the hard part is figuring out how to do it.

[-] darklamer@lemmy.dbzer0.com 1 points 1 year ago

Don't you have continuous backups of your work laptop!?

[-] Michal@programming.dev 1 points 1 year ago

On one occasion i had to take over a task from a colleague while he was on his day off. He did not push his changes. I am sure he had backups but when i asked him to push his changes he had to drive home to do it.

I'd rather company IP stays on its git server.

[-] gitstash@lemmy.world 22 points 1 year ago

git stash, girl

[-] cupcakezealot@lemmy.blahaj.zone 15 points 1 year ago

never commit on friday afternoon because you'll regret it on monday morning

[-] Anticorp@lemmy.ml 11 points 1 year ago

ABC, always be committing.

[-] XTornado@lemmy.ml 10 points 1 year ago* (last edited 1 year ago)

W E

W A S

[-] HubertManne@kbin.social 5 points 1 year ago

commit history was how I determined when to do the nightly and big weekend backups for a place I admined at one point. It was so annoying that we had one developer that liked to stay up way late and one that like to get up way the fuck early. Thank god they were all colocated at that point in time. If they had different timezones I would have just had to say eff it and let them have some poorer preformance.

[-] atticus88th@lemmy.world 4 points 1 year ago

Honey, I was reviewing the new interns pull request. She was having a real hard time. We kept pushing and pulling until we eventually found ourselves getting that commit all over the codebase. Needless to say it won't happen again, it was a one night standing review.

[-] StarkillerX42@lemmy.ml 3 points 1 year ago

No babe! I was busy doing review!

this post was submitted on 15 Sep 2023
716 points (97.2% liked)

Programmer Humor

19747 readers
1 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 2 years ago
MODERATORS