Skip to content

Instantly share code, notes, and snippets.

@tobyweston
Last active December 19, 2015 09:19
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save tobyweston/5932618 to your computer and use it in GitHub Desktop.
Git rebase and IntelliJ

To configure your repository to always rebase when pulling;

git config branch.master.rebase true

which turns the relevant section of your '.git/config' from

[branch "master"]
  remote = origin
  merge = refs/heads/master

to

[branch "master"]
  remote = origin
  merge = refs/heads/master
  rebase = true

In IntelliJ IDEA, when doing up SCM update, it may ask you how to go about the update. Here you can override the setting above to do a regular merge (git fetch, git merge or git pull --no-rebase), a rebase (git fetch, git rebase or git pull --rebase) or rely on the setting above in your config.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment