Hacker News new | past | comments | ask | show | jobs | submit login

I don't know if Christian would go this far, but I actually put this into my ~/.gitconfig so that I'm always rebasing

[pull]

rebase = true

edited for line spacing




Just a nit on the HN comment, you can indent the lines 2 spaces so that it shows up as a code block, it should maintain the correct spacing/line wrapping and it uses a monospaced font as well

  like this


Today I learned, thanks a lot!

Created a MR for the Developer Evangelism Hacker News handbook to add this formatting tip, and some more https://gitlab.com/gitlab-com/www-gitlab-com/-/merge_request...


Thanks - today I learned


You are more brave than I am - I have it explicitly disabled :-) https://gitlab.com/dnsmichi/dotfiles/-/blob/main/.gitconfig

When I pull and it runs into a merge conflict, I want to see that error/log on the CLI. Reason: Sometimes the automated pull-rebase takes a very long time to resolve conflicts after each step. I prefer to first run

  git fetch

  git diff branchname origin/branchname
and then decide my strategy :)

Bit off-topic but since we share .gitconfig tips - I upgraded to a recent Git version and enabled the "git push" option to setup tracking automatically. No more "git push -u origin branchname" actions. https://gitlab.com/dnsmichi/dotfiles/-/blob/main/.gitconfig#...

  [push]
   autoSetupRemote = true


Yeah, I wish this was the default functionality in git, to me it never makes sense not to want to rebase when pulling.


`pull.rebase` should be the default just because it avoids the problem of merge commits.


Wow did not know this existed. I’ll add it to my config




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: