2

Most of the time, when I push a git branch to Azure DevOps, it appears in the "Mine" list on the branches screen there. However there is a certain repo where this is not the case. I made sure that my git email address that I am using to push the branches matches the email address I use to sign in to Azure DevOps, but for some reason that one repo won't show me my branches. There are other repos in the same organization that work just fine. What could be going on with this one repo? Thanks! :)

edit: I caught this issue in action!

enter image description here

The individual commits are associated with my account, but when I push to Azure DevOps, the push is associated with Anthony's account. Now I was previously signed in to Azure DevOps as Anthony in order to make changes, but once my account was set up, I thought I switched over to my own. Somehow I must still be logged in as Anthony - but where?

ekolis
  • 6,270
  • 12
  • 50
  • 101

3 Answers3

3

I had to delete my old credentials using the other account from Windows, as explained here:

Git pushing to remote GitHub repository as wrong user

tl;dr

  1. go to Windows control panel > user accounts > credential manager > Windows credentials
  2. find my old login to git:https://dev.azure.com/blah and click on it
  3. click "remove"

After doing so, I made a test branch and tried to push it; I was prompted to sign in with my correct account, and after doing so the branch showed up properly on the "my branches" screen in Azure DevOps.

ekolis
  • 6,270
  • 12
  • 50
  • 101
0

Azure mentions:

The default Mine tab on the branches page shows branches you've created, pushed changes to, or set as a favorite, along with the default branch for the repo, such as master.

So either the name (in addition of the email) is not exactly your account.
Or you are viewing those branches while logged in with a different account than the one used to make those commits.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • The name associated with my Azure account is the same name that I'm using to push in Visual Studio Team Explorer. The email address I'm pretty sure is the same as well; I do have a personal email and a work email, so maybe it was mixed up before but I did fix it earlier and that didn't help, even with newly created branches... – ekolis Dec 10 '19 at 20:08
0

There are two things need to be confirmed:

  1. Is this the only branch that you can’t push to your project in Branches – Mine or you tried to push other branches with the same environment( same login and same project and so on) and also failed? If you met the second situation (can’t push any other branches), you should check current project settings – Repositories – create branch is allowed.

  2. Please check the Branches – All and search in Stale if you can see THE branch. If not, maybe you didn’t push the branch successfully, please check if there’s any error or conflict during the push process.

mbb5079
  • 646
  • 1
  • 5
  • 10
  • The branches do exist in Azure - they just don't show up under "My Branches". Thanks though! – ekolis Dec 10 '19 at 20:04
  • I think there are some special settings for your current account that makes the Azure DevOps can't recongnize you as yourself. I suggest you could use another account to push from vs then see if you can get it in Mine(with test account log in) and test if you can reproduce the problem. Also, once you pushed a branch from vs you can see realted commits created in Devops, please check if the right accoutn who created it. – mbb5079 Dec 13 '19 at 06:51