|RefSpec question Git vs. Egit [message #1001503]
||Wed, 16 January 2013 20:50
| Steve Coffman
Registered: January 2013
I'm used to git at the command line, and I'm trying to translate my workflow into Egit.|
However, there appear to be some major differences that are confusing me.
The biggest appears to be differences in Fetch and Push refspecs.
In Git, when I track a remote branch branch, I can push and pull directly:
- git checkout --track -b refactored origin/refactored
- make changes
- git commit -am "Made some changes"
- git push origin refactored
After this, my .git/config files are set to:
remote = origin
merge = refs/heads/DEV
rebase = true
In EGit, in order to push and pull, after I clone and select the "refactored" branch I need to:
- Right Click on project name, select Team -> Remote -> Configure Fetch
- Ref mappings should be "+refs/heads/*:refs/remotes/origin/*" (no quotes) and then Save
Right Click on project name, select Team -> Remote -> Configure Pull
- Ref mappings should be "+refs/heads/*:refs/remotes/origin/*" (no quotes) and then save
My EGit .git/config usually ends up looking like this:
remote = origin
merge = refs/remotes/origin/refactored
This seems like maybe I'm doing things wrong. Any ideas? Thanks for any illumination.
|Re: RefSpec question Git vs. Egit [message #1002398 is a reply to message #1001503]
||Fri, 18 January 2013 14:03
| R Shapiro
Registered: June 2011
When you say 'select the "refactored" branch", what do you mean exactly? |
What you want to do here is:
- Open the "Branches" dialog [several of ways to get here, I usually use the toolbar item]
- In that dialog open the "Remote Tracking" section and select the remote branch you want to track
- Click the "New Branch..." button, which will show the "Create Branch" dialog
- Choose the 'rebase' radio button option as 'pull strategy' [if you want rebase; the default is merge]
- Ensure that the the "Checkout new branch" checkbox is checked, which it is by default.
It's much quicker and easier than it sounds.
Powered by FUDForum
. Page generated in 0.02093 seconds