Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 345536 - Add support / preference for the branch.autosetuprebase option
Summary: Add support / preference for the branch.autosetuprebase option
Status: CLOSED FIXED
Alias: None
Product: EGit
Classification: Technology
Component: UI (show other bugs)
Version: 0.12   Edit
Hardware: PC Linux-GTK
: P3 major (vote)
Target Milestone: 2.0-M1   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-05-12 03:29 EDT by James Blackburn CLA
Modified: 2012-07-27 10:15 EDT (History)
18 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description James Blackburn CLA 2011-05-12 03:29:13 EDT
For committers pulling and pushing directly into a shared repo. we would like to enforce pull --rebase on the tracking branches by default.  (With the option for advanced users to merge when they know it's appropriate.)
Comment 1 Mathias Kinzler CLA 2011-05-12 06:02:51 EDT
I believe this is already implemented. If you configure (either per repository or per user or per system) 

branch.autosetupmerge = always
branch.autosetuprebase = always

then the dialog shown during branch creation will select the "Rebase" radio button as default for the pull strategy.
Unfortunately, this is not documented...
Comment 2 Matthias Sohn CLA 2011-05-12 08:33:35 EDT
Tried with todays nightly and this works as described by Mathias. This functionality was added [1] beginning of February and is already included in 0.12.1.

[1] http://egit.eclipse.org/w/?p=egit.git;a=commit;h=8201f78bed1882428b3f08b24790cb9b8776a4b0
Comment 3 Markus Keller CLA 2011-09-29 07:20:11 EDT
This doesn't work for me during the initial cloning. When I set

    branch.autosetuprebase = always

in my global .gitconfig, I don't get the

    branch.master.rebase = true

set in the cloned repository. This works fine on the command line.
Comment 4 Markus Keller CLA 2011-10-21 07:26:01 EDT
This bug makes it so easy to miss setting branch.master.rebase whenever you clone a new repo.

And I don't even see a way to recover if I already pulled and got bogus branches and merges.
Comment 5 Emond Papegaaij CLA 2011-12-06 14:06:45 EST
This indeed is very inconvient. You have to remember to always set the option after you cloned a repository.

In reply to #4: recovering from an accidental merge is not too difficult, as long as this merge has not yet been pushed to a remote repository. Normally 'git reset HEAD^ --hard' should remove the merge commit, after which you can rebase.
Comment 6 Stefan Lay CLA 2012-01-04 09:27:36 EST
Fix proposed at http://egit.eclipse.org/r/4919
Comment 7 Paul Webster CLA 2012-01-28 08:42:26 EST
I see 1.3 is almost done.  Could we get this early in 1.4 then?

PW
Comment 8 Jan Koops CLA 2012-02-24 01:58:15 EST
Cool, I see it's on master now, so I can remove my local fix.
Now only Bug 367174 remains for easy global configuration of system wide configurations.
Comment 9 Stefan Lay CLA 2012-02-24 02:58:36 EST
Fixed with 54f23873d60f3b7f70427f5db9ff2a93229a193e
Comment 10 Dani Megert CLA 2012-02-28 06:03:27 EST
Verified in 2.0.0.201202261814.

Thanks!
Comment 11 Lars Vogel CLA 2012-07-27 10:15:46 EDT
Bug set to closed.