Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] [egit-dev] Pull vs. Rebase


On 12 May 2011 08:05, Swindells, Thomas <TSwindells@xxxxxxx> wrote:

That certainly looked a good plan to me, as does adding support for the branch.autosetuprebase config option.


Great. Thanks all for the detail. I've filed:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=345536  - add support for branch.autosetuprebase option (not sure if this is an egit / jgit feature?)
 https://bugs.eclipse.org/bugs/show_bug.cgi?id=345504 - add UI for configuring merge / rebase on an existing branch

For the moment it's straightforward for users to type (or use the UI):
   git config branch.master.rebase true
   git config branch.cdt_X_X.rebase true
   ...

Cheers,
James

 

Thomas

From: egit-dev-bounces@xxxxxxxxxxx [mailto:egit-dev-bounces@xxxxxxxxxxx] On Behalf Of Matthias Sohn
Sent: 12 May 2011 00:26
To: Alex Blewitt
Cc: CDT General developers list.; EGit developerdiscussion


Subject: Re: [egit-dev] Pull vs. Rebase

 

2011/5/12 Alex Blewitt <alex.blewitt@xxxxxxxxx>

We could certainly make this easier without needing to know all of the config specifics though?

 

yes, of course this could be simplified by adding a dedicated dialog similar to the one in the 

create branch dialog to configure the branch tracking relationship at a later point in time

 

On 11 May 2011, at 23:59, Matthias Sohn <matthias.sohn@xxxxxxxxxxxxxx> wrote:

2011/5/11 James Blackburn <jamesblackburn@xxxxxxxxx>

On 11 May 2011 21:55, Matthias Sohn <matthias.sohn@xxxxxxxxxxxxxx> wrote:

Currently the pull strategy can be configured when creating a new local branch based on a remote

tracking branch in the branch creation dialog mentioned in [1]. If you select the pull strategy "Rebase"

pull will do fetch + rebase (local branch onto updated remote tracking branch). 

 

It looks like this option only exists when creating a branch.  I couldn't figure out how to change it for an existing branch (master), or while using the File > Import > Git wizard.

 

This is a per-local-branch configuration, you may do that for already existing branches 

by adding the corresponding configuration entries e.g. by using the configuration 

editor under  "Preferences > Team > Git > Configuration" or by editing the 

.git/config file using your favorite test editor

 

You need the following entries for a local branch tracking a remote branch:

branch.<branchname>.remote=<remote used to define the upstream repository>

branch.<branchname>.merge=refs/heads/<remote branch in upstream repository to be tracked>

branch.<branchname>.rebase=true (to use rebase pull strategy)

 

e.g. if you are creating a local branch "featureX" which shall track changes coming from

the branch "stable-1.1" in the upstream repository through the remote "eclipse"

you need to add the following configuration entries:

 

branch.featureX.remote=eclipse

branch.featureX.merge=refs/heads/stable-1.1

branch.featureX.rebase=true

 

find more details by searching "branch.<name>." in [1]

 

the used origin of course must be defined, you may add missing definitions 

e.g. from repositories view by using the menu actions

"add remote", "configure fetch", "configure push" 

 

you need at least

 

remote.<remotename>.url="" used to reach upstream repository>

remote.<remotename>.fetch=<fetch refspec defining how to map branches from upstream to local repository when fetching>

 

optional : 

remote.<remotename>.pushurl=<url used to push changes to upstream, if missing "url" is used>

remote.<remotename>.push=<push refspec defining how to map local branches to branches in upstream repository when pushing>

 

for the example this could be:

remote.eclipse.url="" href="http://egit.eclipse.org/egit.git" target="_blank">egit.eclipse.org/egit.git

remote.eclipse.fetch=refs/heads/*:refs/heads/*

remote.eclipse.pushurl=ssh://joedev@xxxxxxxxxxxxxxxx:29418/egit.git

remote.eclipse.push=HEAD:refs/heads/master  (this would translate to pushing currently checked out branch to upstream master)

 

 

--
Matthias

_______________________________________________
egit-dev mailing list
egit-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/egit-dev




--
Matthias




**************************************************************************************
This message is confidential and intended only for the addressee. If you have received this message in error, please immediately notify the postmaster@xxxxxxx and delete it from your system as well as any copies. The content of e-mails as well as traffic data may be monitored by NDS for employment and security purposes. To protect the environment please do not print this e-mail unless necessary.

NDS Limited. Registered Office: One London Road, Staines, Middlesex, TW18 4EX, United Kingdom. A company registered in England and Wales. Registered no. 3080780. VAT no. GB 603 8808 40-00
**************************************************************************************

_______________________________________________
egit-dev mailing list
egit-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/egit-dev



Back to the top