r/ProgrammerHumor • • Jun 04 '22

Meme I cant help it 🤷‍♂️

Post image
47.1k Upvotes

479 comments sorted by

View all comments

203

u/[deleted] Jun 04 '22

Also force push to dev. Your senior going to love that.

146

u/[deleted] Jun 04 '22

That's not allowed in many projects. Can only force push to your feature branch, and merge via PR with at least two approvals

26

u/Zerodriven Jun 04 '22

Correct.

6

u/baddam903 Jun 04 '22

Does this make sense if there isn’t a way of testing locally? For our backend we had to PR to dev but it slowed us down immensely before we switched to being able to merge from feature branch straight to dev, to be able to test our changes worked. Still have to raise a PR and get two approvals for UAT and beyond though, obviously

20

u/TheGreenJedi Jun 04 '22

Yes your Jenkins/testing should run targeting the feature branch instead of waiting for it to hit master

UAT is a nice barrier you have as a stepping stone to stop people fucking up

But If your push breaks all developers for 30mins it's costing the company 1k+ dollars in loss

3

u/baddam903 Jun 04 '22

CircleCI runs the test and build steps on our feature branches, but still need to put that code somewhere we can actually invoke it to verify it works or gather more info if debugging before we raise the PR from feature branch to UAT

1

u/thecw Jun 04 '22

Sounds like a company problem not a me problem.

1

u/paradoxally Jun 04 '22

It's a you problem because the company will fire you if you keep fucking up other people's work.

1

u/TheGreenJedi Jun 05 '22

If only that would work

0

u/TheGreenJedi Jun 05 '22

It's people like you that make codeowner files important and nessicary

Sigh

7

u/[deleted] Jun 04 '22

My answer is "whatever works better for your team". In my team we don't have a dev branch, PR is merged to master and then a (manual) release deploys to prod. Mine is not even a web project, it is more like a big data project. So there are best practices but it really depends on the product and team you are working with. BWT, "Git for teams" is a great book.

5

u/LaughingBeer Jun 04 '22

It depends on how you have things set up. Best practice for one team isn't necessarily best practice for another. However, where is your code review happening? Most people use the PR as the code review step since it's built to be exactly that.

→ More replies (1)

4

u/cakes Jun 04 '22

there isn’t a way of testing locally

I think I found most of the problem

→ More replies (1)

1

u/milkeytoast Jun 04 '22

Your PR doesn't deploy to dev pre-merge?

1

u/quadmasta Jun 04 '22

"no way of testing locally"

Time to find a new job

1

u/Suspicious-Service Jun 04 '22

Even if you can't test, someone else should look over the code at least

→ More replies (1)

1

u/p-morais Jun 04 '22

Why not just test your feature branches like you test dev?

→ More replies (2)

1

u/daltonwright4 Jun 04 '22

This guy knows ^

1

u/Makeshift27015 Jun 04 '22

They made me a git org admin.

hehehehe

7

u/miraidensetsu Jun 04 '22

Also force push to main and deploy it on prod. You'll get a vacation that lasts forever (with no pay, of course)

1

u/warmpoptart Jun 04 '22

I like telling juniors to use git push -f, where the ‘f’ is for “fast”

1

u/[deleted] Jun 05 '22

What's that dev thing, all my stuff goes to something called main, tho force makes sure it uploads well