Community
Participate
Working Groups
Build Identifier: 20110916-0149 This is a problem when you're creating a new local branch or repo and then push it to the remote repo, you won't be able to do a pull on it without deleting it and recreating it from the new remote branch or manually editing the git configuration due to a missing merge strategy config entry. The error box for pull should offer to automatically create such a strategy using a remote branch of the same name from the default remote repo. And better yet is to offer to create this strategy entry immediatly after doing a push for a new branch. (the -u option to git push) Reproducible: Always Steps to Reproduce: 1. Try to use pull for a new local branch that you just pushed.
Also adding force to the create dialog so you don't have to delete first would be nice.
I add this information, the error is this: The current branch is not configured for pull No value for key branch.bug/001150/some-bug found in configuration" supposing "bug/001150/some-bug" is the name of the new branch On git command line you are supposed to follow this workflow: # create new branch git co -b my-new-branch #hack hack hack # push at some time, requiring to set the new branch as tracking a remote branch: git push --set-upstream origin my-new-branch # next time you pull git know from where: git pull when you do --set-upstream (or -u for short) git add a section like this on the .git/config file of your project: [branch "bug/001150/some-bug"] remote = origin merge = refs/heads/bug/001150/some-bug I found no way with Egit to make it create that same configuration without manually adding the properties. Suggestion: add a flag in the push dialog to set as upstream (selected by default, which is usually what you want to do)
Agreed. The upstream should automatically be set when the user does a Push. Consider the following user story which is easy using TortoiseGit but just took me hours to figure out using eGit: 1) I create a branch and make some commits 2) I Push this branch and commits to a central repo 3) My colleague Pulls from the central repo and sees my new branch 4) My colleague switches to this new branch (which is also a bit tricky due to bug 341679) 5) They make some commits and then Push them back to the central repo 6) I pull from the central repo and see my colleague's changes This is one of the most common workflows and should be really easy. Instead, it is very tricky and requires a relatively deep understanding of git's tracking branches etc. Most newbies take a long time to get comfortable with that stuff.
Please see bug 382190 about my plan to improve the "publish branch" workflow. And bug 341679 is also on my list. It's probably one of the most confusing things for newcomers.
Marking this as a duplicate of bug 382190. Please also note that the upstream configuration can be set via the Git Repositories view -> right click on branch -> Configure Branch... *** This bug has been marked as a duplicate of bug 382190 ***