Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When pushRemote is set to true, the new branch has no upstream set. #52

Closed
kamaladafrica opened this issue Jun 27, 2017 · 4 comments
Closed

Comments

@kamaladafrica
Copy link

When the pushRemote property is set to true, the new created branch upstream is not set and the branch is not tracked

es.
mvn gitflow:feature-start -DpushRemote=true

from the feature branch, calling
git push

result in

There is no tracking information for the current branch.
Please specify which branch you want to merge with.
See git-pull(1) for details.

git pull <remote> <branch>

If you wish to set tracking information for this branch you can do so with:

git branch --set-upstream-to=origin/<branch> feature/DEV-1
@kamaladafrica
Copy link
Author

kamaladafrica commented Jun 27, 2017

I think that can suffice add "-u" parameter when calling executeGitCommand in gitPush method of the AbstractGitFlowMojo

@aleksandr-m
Copy link
Owner

@kamaladafrica Why strikethrough text? :)

@kamaladafrica
Copy link
Author

Because after a quick a test, I noticed that the change leads to an issue (if I'm not wrong).
Creating a remote branch is useful for collaboration, but, for example, if a collaborator starts a feature branch that already exists, "push -u" command abort with the error that branch already exists.
Maybe it's better to checkout and track the existing branch.
So, the strikethrough is because I'm not sure that the change can suffice, or if there is a better way to do that.

PS.
Great job @aleksandr-m, thank you

@aleksandr-m
Copy link
Owner

If branch with that name already exists on remote the push will probably fail, but not because of the -u. They are different branches with the same name, so checking out won't work here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants