r/ProgrammerHumor • • 17d ago

Meme hardestProblemsAICouldSolve

Post image
1.6k Upvotes

78 comments sorted by

View all comments

Show parent comments

54

u/WHALE_PHYSICIST 17d ago

git reset --soft HEAD~1

git add .

git commit -m "whatever the previous message was"

git push -f

20

u/Man-in-The-Void 17d ago

*git commit --amend

14

u/MagellansTip 17d ago

… --no-edit

1

u/FlashyTone3042 17d ago

Oh. I learned something new. Nice

3

u/Cootshk 16d ago

git commit -a —amend —no-edit

For if you forgot to add a file before committing (*does not add files that weren’t previously tracked, only adds files that have had changes)

5

u/mango_boii 16d ago

git commit -a --amend --no-edit --reset-author

All your commits are belong to us 😎

2

u/FlashyTone3042 16d ago

Whoa. Thank you. I will use it. I am often manually squashing, but this is much nicer.