Git track a remote branch using netbeans
Maybe my solution for this problem seems to be too easy, but I had the same error and instead of using Push to Upstream you just have to use Push for your first commit. Afterwards you can select your remote repository/branch in Netbeans.
I don't have git installed on my computer
Yet, that remains the safest solution: simply unzip the archive msysgit (it you are on windows), and do a:
git branch -u master origin/master
Even other users came to the same conclusion.