Hacker News new | ask | show | jobs
by rachbelaid 4795 days ago
I usually suggest to change the config to avoid that people forgot the --rebase arguments

git config branch.master.rebase true git config branch.develop.rebase true

This will make any pull be a pull --rebase on the master/develop

1 comments

Doing stuff like that is dangerous in my opinion. People may forget that they're actually doing something different from what they typed.

Explicit is better than implicit.

But even typing git pull isn't canonical, bar what the defaults are. git pull pretty much does a git fetch && git merge for you.
Yes but that's the default behaviour of git pull so it's expected to fetch and merge when you pull. Changing the default behaviour can lead to confusion or mistakes.
But as noselasd said git pull = Fetch + merge

Setting up the rebase in config of a specific branch stay explicit because Git will

If the rebase is not straight forward then you can still abort it.

I would love that git has a config feature to force ff-only on pull but base on what I know you need to create an alias to have `pull --ff-only` replacing `pull`