This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 246652 - A new branch I create on Netbeans is not correctly pushed to the upstream (quick), it synchronizes with the master instead of my new branch. I need to revert everytime..
Summary: A new branch I create on Netbeans is not correctly pushed to the upstream (qu...
Status: RESOLVED FIXED
Alias: None
Product: versioncontrol
Classification: Unclassified
Component: Git (show other bugs)
Version: 8.0
Hardware: Macintosh Mac OS X
: P3 normal (vote)
Assignee: Ondrej Vrabec
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-08-22 21:23 UTC by broumbroum
Modified: 2014-11-10 23:20 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description broumbroum 2014-08-22 21:23:03 UTC
Product Version = NetBeans IDE 8.0 (Build 201403101706)
Operating System = Mac OS X version 10.9.4 running on x86_64
Java; VM; Vendor = 1.8.0_11
Runtime = Java HotSpot(TM) 64-Bit Server VM 25.11-b03
Comment 1 Ondrej Vrabec 2014-08-29 08:19:37 UTC
i guess git push to upstream should always push to the equivalent branch in the remote repo instead of the equivalent to its tracked branch.
So if you create a branch "BRANCH" based on origin/master (and set its tracking in the config) then push to upstream should push to remote|BRANCH as well. And potentially ask user if she wants to create the new branch in the remote repo.
Comment 2 Ondrej Vrabec 2014-08-29 08:29:05 UTC
... or more precisely we should comply with git's man pages:
push.default

    Defines the action git push should take if no refspec is given on the command line, no refspec is configured in the remote, and no refspec is implied by any of the options given on the command line. Possible values are:

        nothing - do not push anything.

        matching - push all branches having the same name in both ends. This is for those who prepare all the branches into a publishable shape and then push them out with a single command. It is not appropriate for pushing into a repository shared by multiple users, since locally stalled branches will attempt a non-fast forward push if other users updated the branch.
        This is currently the default, but Git 2.0 will change the default to simple.

        upstream - push the current branch to its upstream branch. With this, git push will update the same remote ref as the one which is merged by git pull, making push and pull symmetrical. See "branch.<name>.merge" for how to configure the upstream branch.

        simple - like upstream, but refuses to push if the upstream branch’s name is different from the local one. This is the safest option and is well-suited for beginners. It will become the default in Git 2.0.

        current - push the current branch to a branch of the same name.

    The simple, current and upstream modes are for those who want to push out a single branch after finishing work, even when the other branches are not yet ready to be pushed out. If you are working with other people to push into the same shared repository, you would want to use one of these.

So currently it behaves as "upstream" no matter what gitconfig states.
Comment 3 Ondrej Vrabec 2014-08-29 11:42:57 UTC
fixed: core-main #26d0c3499a79
Comment 4 Quality Engineering 2014-08-30 05:19:52 UTC
Integrated into 'main-silver', will be available in build *201408300001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/26d0c3499a79
User: Ondrej Vrabec <ovrabec@netbeans.org>
Log: Issue #246652 - A new branch I create on Netbeans is not correctly pushed to the upstream (quick), it synchronizes with the master instead of my new branch. I need to revert everytime..
Support push.default option and ask user before creating new branch in a remote repository.
Once the branch is pushed and local refs are updated, ask user to setup the correct remote branch tracking.
Comment 5 Ondrej Vrabec 2014-11-10 11:35:46 UTC
release801: http://hg.netbeans.org/releases/rev/e6576d95d1e8
Comment 6 Quality Engineering 2014-11-10 23:20:54 UTC
Integrated into 'releases/release801', will be available in build *201411102027* or newer. Wait for official and publicly available build.

Changeset: http://hg.netbeans.org/releases/rev/e6576d95d1e8
User: Ondrej Vrabec <ovrabec@netbeans.org>
Log: Issue #246652 - A new branch I create on Netbeans is not correctly pushed to the upstream (quick), it synchronizes with the master instead of my new branch. I need to revert everytime..
Support push.default option and ask user before creating new branch in a remote repository.
Once the branch is pushed and local refs are updated, ask user to setup the correct remote branch tracking.
(grafted from 26d0c3499a7958de6b7b2c1182d70d126a1e7e09)