In Visual Studio 2019 I have "Unpushed Commits" as seen below:
When I try to push them I get the error and this is what it looks like on the GUI:
note: the yellow label with "Failed to push..." is not clickable.
The Output from Source Control - Git is as follows:
The output window doesn't show me any useful details. Am I looking in the wrong place? Is there a better place to see the actual error?
The answer in this case is that the policy on the branch 'develop' does not allow direct pushes. I was kinda hoping that the error in the output would state something like 'Failed to push due to a policy constraint on the branch'
Have few reasons for this case:
pull
, then push
.I was getting the same error and after trying lot of things, I found the solution.
Solution - Go to your GitHub account >> Profile >> Emails >> "Keep my email addresses private" - >> Uncheck this option.
Note : - This error may occur due to various reasons. This is the one of reason to fail the Push operation. To know the exact reason check your Output window in Visual Studio.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With