Programmer Humor
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
- Keep content in english
- No advertisements
- Posts must be related to programming or programmer topics
git rebase
is only for terrorists. ๐ฅธ
Also for me when Iโve been drinking and committed some really stupid shit into the repo. No one needs to know what I really think of my team members.
Heres my based af workflow:
git checkout -b feature-branch
rebase on top of dev whilst working locally
git rebase origin/dev-branch && git push -f
if i need to fix conflicts with dev-branch during a PR
git merge origin/dev
Anyone mind explaining to me how git rebase
is worth the effort?
git merge
has it's own issues but I just don't see any benefit to rebase over it.
I use interactive rebases to clean up the history of messy branches so they can be reviewed commit by commit, with each commit representing one logical unit or type of change.
Mind you, getting those wrong is a quick way to making commits disappear into nothingness. Still useful if you're careful. (Or you can just create a second temporary branch you can fall back onto of you need up your first once.)
This 100%. I hate getting added to a PR for review with testing commits in the history, and I'm expected to clean those up before merging into main.
Well, rebase allows you to resolve the same conflict ten times in a row instead of doing it once. How cool is that?
Squash your branch first
Doesn't this defeat the purpose, may as well merge then no?