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 226787 - Netbeans fails to push a branch
Summary: Netbeans fails to push a branch
Status: RESOLVED WONTFIX
Alias: None
Product: versioncontrol
Classification: Unclassified
Component: Git (show other bugs)
Version: 7.3.1
Hardware: PC Windows 7
: P3 normal (vote)
Assignee: Ondrej Vrabec
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-02-27 13:36 UTC by tha_specializt
Modified: 2013-06-19 12:16 UTC (History)
1 user (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 tha_specializt 2013-02-27 13:36:26 UTC
Product Version: NetBeans IDE 7.3 Beta 2 (Build 201211062253)
Updates: NetBeans IDE is updated to version , NetBeans 7.3 Beta 2
Java: 1.7.0_11; Java HotSpot(TM) Client VM 23.6-b04
Runtime: Java(TM) SE Runtime Environment 1.7.0_11-b21
System: Windows 7 version 6.1 running on x86; Cp1252; de_DE (nb)

I created a new local branch via Netbeans, pushed for the first time via console, configured the branch to track the new remote branch (also via console) and after that Netbeans spits out the error : 

"No tracked remote branch specified for local development" everytime when i try to push via Netbeans. There is certainly something wrong with the way Netbeans creates and tracks branches, listing the branch-config reveals a very faulty standard-setting of 

merge = +refs/heads/master:refs/remotes/origin/master

for my branch - i had to fix that manually ... which resulted in the above error. Pushing via console works just fine, this is my current config:

[branch "MYBRANCHNAMEHERE"]
remote = origin
merge = refs/heads/MYBRANCHNAMEHERE

[branch]
autpsetupmerge = true

[push]
default = tracking

Pushing non-FF is a _very_ bad idea, the guy who programmed this should'nt be allowed to develop Netbeans ... really, thats circumventing the whole reason for file-versioning systems.
Comment 1 Ondrej Vrabec 2013-02-27 13:55:31 UTC
> to push via Netbeans. There is certainly something wrong with the way Netbeans
> creates and tracks branches, listing the branch-config reveals a very faulty
> standard-setting of 
> 
> merge = +refs/heads/master:refs/remotes/origin/master
> 
> for my branch - i had to fix that manually ... which resulted in the above
> error. Pushing via console works just fine, this is my current config:
I am not sure i understand your point. I am not aware of any place in the code where we set:
> merge = +refs/heads/master:refs/remotes/origin/master
Can you paste the original version of the config file before you fixed it?

> Pushing non-FF is a _very_ bad idea
We never allow non-FF pushing, it always fails in NB and opens a dialog warning you about a needed pull and merge before pushing.

And anyway, i am not sure i should even attempt to fix your problem because according to your post:
> the guy who programmed this should'nt be allowed to develop Netbeans
Comment 2 tha_specializt 2013-02-27 14:02:50 UTC
> Can you paste the original version of the config file before you fixed it?

the original version is long-since gone, but thats pretty much the exact, relevant line. Netbeans created a faulty branch.

> And anyway, i am not sure i should even attempt to fix your problem 

Un-hunh .... thats .... good for you, i guess.
Comment 3 Ondrej Vrabec 2013-02-27 14:14:28 UTC
> I created a new local branch via Netbeans, pushed for the first time via
> console, configured the branch to track the new remote branch (also via
> console) and after that Netbeans spits out the error : 
> "No tracked remote branch specified for local development" everytime when i try
> to push via Netbeans. There is certainly something wrong with the way Netbeans
> creates and tracks branches
Fails because if you do that in commandline the remote branch won't probably be updated (added) under .git/refs/remotes/origin/ which is expected when you're doing a Git -> Push/Pull/Fetch to/from Upstream. Simply ensure the reference is there.

> Netbeans created a faulty branch.
I do not agree. Unless you are able to backup your claim e.g. by attaching the config file after a branch is created and point to the incorrect setting i am hardly able to do anything with it.
Comment 4 Dark 2013-06-19 10:31:30 UTC
I can provide further hints how to get to this bug.
If you have already a git project to Clone then everything works fine (push / pull)
But if you initialize a new project with Git->Initialize there could no remote Branch be specified. 

This is the Git config File that will be generated:
[core]
	repositoryformatversion = 0
	filemode = false
	logallrefupdates = true
	bare = false

If you want automatic Push / Pull to Upstream then I found no way to make that in the IDE.

Greetings,

Dark
Comment 5 Ondrej Vrabec 2013-06-19 10:46:26 UTC
use Git -> Push/Pull... if you don't have remote specified.
What you're looking for is filed as #191540
Comment 6 Dark 2013-06-19 12:16:43 UTC
Yes, #191540 is maybe the feature that I am missing

This is a solution that I found:
http://enzam.wordpress.com/2013/04/19/how-to-solve-netbeans-error-no-tracked-remote-branch-specified-for-local-branch-name/