HackerLangs
TopNewTrendsCommentsPastAskShowJobs

acallaghan

no profile record

comments

acallaghan
·14 giorni fa·discuss
When AI bubble pops, no bailouts. I'm not paying for this BS
acallaghan
·mese scorso·discuss
My point is really that the default --force is dangerous for new/sleep deprived users, or ones that kinda understand but don't - where as --force-with-lease is not and is always safe. --force-with-lease should just be default
acallaghan
·mese scorso·discuss
I'm also like this, rebasing feature branches onto main - I however have one suggestion when it comes to the push back up to origin

Instead of

`git push --force`

always use

`git push --force-with-lease`

https://git-scm.com/docs/git-push

This probably should be the default in git (as in there should be a `git push --force-without-lease` instead) and asks git to make sure the commits locally on your branch are up-to-date with those on remote/origin. It then fails if you try to overwrite commits that you haven't seen, and has saved me a few times when working between computers on the same project when i could have lost history on the remote that i failed to fetch.
acallaghan
·2 mesi fa·discuss
This is great, i've been wanting someone to do this for a while, and was tempted to myself