0

Azure Git Portal, Branching, Commit, Push and Pull Request Issue

I received this error. Tell me why?

Failed to push to the remote repository. See the Output window for more details. Error encountered while pushing to the remote repository: Failed to push to the remote repository. See the Output window for more details.

Am I doing something wrong?

  1. First I am checking where am I? Current branch

git branch

It shown me - I am in master branch

  1. Then get lattes changes and sync my master

After that make some changes in master

  1. Then I create a new local branch

git branch -c dev/myLocalBranch

  1. and all pending changes was copy into new branch also git checkout dev/myLocalBranch

  2. Check again where am I? I am in new branch git branch

  3. Staging all changes

  4. Commit

  5. Pull

Here gives error: "Failed to push to the remote repository. See the Output window for more details. Error encountered while pushing to the remote repository: Failed to push to the remote repository. See the Output window for more details."

Why? I pushed into "myLocalBranch" only? It seems want to push into remote master?

  1. Sync

Again, give me the same error.

  1. I do create pull request from Azure. This mean. I saw my commits. Even it is not pushed.

  2. Now in my local branch I see 1 for pushing (it is prepared for pushing). How to push in my local branch only?

Show me how to push to my local branch. My local branch does not have any rule for pull request. Or it is problem with Azure option?

  • https://techcommunity.microsoft.com/t5/azure-devops/azure-git-portal-branching-commit-push-and-pull-request-issue/m-p/3671677 – pitdel03 Nov 08 '22 at 14:47

1 Answers1

0

Essentially Azure Repos git is no different from other flavours of git and you need to publish your branch remotely as stated in this answer to a similar question.

to publish a local branch remotely:

git push -u origin <branch-name>
Roderick Bant
  • 1,534
  • 1
  • 9
  • 17