'Changing Remote Branch To Push To In Netbeans

I'm using netbeans 7.1 and I want to change remote branch to push to. I cannot find a way to do that. If I do a pull, I can see the branches (dev and master). But when I do a push, I only see my local, then the one orginal branch (master).

Edit:

I can also see the remote branches when I do browse the repo. I see both (dev) and (master) there.

Any advice?



Solution 1:[1]

After two hours I have figured out how to change branches remotely. This is for anyone that may come across this in a search looking for this answer.

right click your project in Netbeans. -> Get -> Branch -> Switch To Branch.

In my case I switched to branch dev, this is the branch I wanted. Note, I lost all my changes. I had to do a history to add them back.

Note again, this takes a few minutes to run. It seems like it scans the project for all changes.

Now that you have your changes in, do the usual steps to push your changes. Now in the final part of the push, you should see the other branch, which was dev for me. Push changes up.

I hope this helps someone out there.

Solution 2:[2]

Another way is,

Select the project > Click Team in toolbar > Branch/Tag > Switch to Branch

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 cheesemacfly
Solution 2 Dinushika Rathnayake