617
submitted 1 year ago by [email protected] to c/[email protected]
you are viewing a single comment's thread
view the rest of the comments
[-] [email protected] 59 points 1 year ago

Gotta review the 5 line PR ten times just to make absolutely totally sure there's nothing wrong with it before submitting it.

[-] [email protected] 37 points 1 year ago

And then notice the spelling error.

[-] [email protected] 5 points 1 year ago

Instant commit --amend + push --force

[-] [email protected] 6 points 1 year ago

Prefer --force-with-lease. It doesn't make a difference in this scenario, but it's a safer habit/default.

[-] [email protected] 3 points 1 year ago

There is no reason to force push anymore - force with lease is always preferable. So said, a frequent rebaser.

[-] [email protected] 4 points 1 year ago

Wait what is the difference between the two?

[-] [email protected] 11 points 1 year ago

Force with lease will send up what your local thinks the most recent commit on the branch was and the host will reject the push if it knows of a more recent commit on that branch. Basically, it saves you from overwriting a commit you didn't realize existed.

load more comments (2 replies)
load more comments (4 replies)
load more comments (5 replies)
this post was submitted on 27 Apr 2024
617 points (98.3% liked)

Programmer Humor

24790 readers
1175 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