|Re: [egit-dev] Pull vs. Rebase|
We could certainly make this easier without needing to know all of the config specifics though?
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 remotetracking branch in the branch creation dialog mentioned in . 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 branchesby adding the corresponding configuration entries e.g. by using the configurationeditor under "Preferences > Team > Git > Configuration" or by editing the.git/config file using your favorite test editorYou 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 fromthe branch "stable-1.1" in the upstream repository through the remote "eclipse"you need to add the following configuration entries:branch.featureX.remote=eclipsebranch.featureX.merge=refs/heads/stable-1.1branch.featureX.rebase=truefind more details by searching "branch.<name>." in the used origin of course must be defined, you may add missing definitionse.g. from repositories view by using the menu actions"add remote", "configure fetch", "configure push"you need at leastremote.<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.gitremote.eclipse.fetch=refs/heads/*:refs/heads/*remote.eclipse.pushurl=ssh://joedev@xxxxxxxxxxxxxxxx:29418/egit.gitremote.eclipse.push=HEAD:refs/heads/master (this would translate to pushing currently checked out branch to upstream master)
Back to the top