By company policy, all pulls unless agreed with tech lead must be done with rebase rather than merge.
I use Eclipse and successfully set the default pull mode to rebase to all my branches (despite Eclipse suggests merge as default mode).
My deskmate, working on my same project, uses IntelliJ Idea. Guess what? He always forgets to check pull-with-rebase when pulling, ending up in endless merge commits.
I often have to complain with him for violating the rule I took so long to make a standard, then I need to do force pushing to fix the tree from the mess. Only 2 people here use IntelliJ, other use Eclipse and have no problems with Git.
How do I set the default pull mode in IntelliJ Idea?
In IntelliJ you can set the default pull strategy in
File -> Settings -> Version Control -> Git
Change it under "Update method". There you can choose "Rebase" instead of "Merge".
Leave alone IntelliJ IDEA. Run git config --global pull.rebase true
in his git bash. Or set this on a per-branch basis, by git config --global branch.<name>.rebase true
, which is safer and more flexible.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With