Value cannot be null. Parameter name: localBranch

Viewed 571

I'm getting this issue when I try to push to GitHub from Visual Studio Mac Version 8.10.14(build 17). Anyone know what is causing the issue?

I assume it is not passing in the name of the branch I want to commit to(I'm trying to commit to the master branch) when I click on it in the menu, which would make sense because I'm having a visual bug along with it.

This is not a parameter that is part of my code, it's a parameter from Visual Studios.

Here are screenshots of what it looks like:

When I first click on "Review and Commit" this screen appears. Normally this shows all the changes I have made, and shows "master" in the Branch parameter. For some reason this screen is appearing blank(which it normally doesn't)

enter image description here

When I click on the Branch dropdown, it shows the Master option, and then all my changes show up like so:

enter image description here

But then when I click "push changes" I get the "Value cannot be null. Parameter name: localBranch" error, as if I had not chosen "master" as the branch to choose to.

enter image description here

Anyone know what is causing this bug?

3 Answers

Starting with advice from @VonC I was able to resolve the issue. While the advice he has provided has put me on the right track the solution that he has suggested turned out to be incorrect, so the right thing for me was to type this into the command line:

git rebase --continue

For testing, switch back to command line and do a git status in the local root folder of your repository.

The goal is to check if you are working indeed on the master branch, or if you see a "detached HEAD" status, in which case you see to get back on a branch, as shown here.

I'm not sure what the actual issue was, so please let me know if anyone finds out, but I was able to fix the issue by resetting everything. I had to completely delete the local project and delete and reinstall Visual Studios.

I just copied the changes that I needed to keep into separate files and copied and pasted them back in once I pulled from the git repository(luckily it was only a few files that hadn't been updated before all the issues started happening)

Please let me know if someone determines what actually caused the issue so I can avoid it in the future.

Just answering this in case someone comes across with the same issue.

Related