What I did was deleted the feature branch in Azure DevOps Services when I performed a PR to move my changes from the feature branch to the main branch. That action deleted the feature branch. (It must be a policy configured by default, because I didn’t configure that. Actually, I thought it a good idea, so I am OK with it.) Then, later in the day, I got into PowerShell locally, then issued a git pull
to bring down all of the changes. I edited the YAML file in the Main branch, believe it to be the only branch I had locally. At that point I tried to push my changes back up to remote. However, because of the recommendations made here yesterday about creating a branch policy, the attempt to push my changes to Main failed. I’m sure because of the new branch policy. The error I got, when I tried to push my changes to remote, indicated that there was a feature branch locally. I don’t recall creating the feature branch locally, so I was surprised. (Everything I was doing, in this case, was editing the YAML build file, I didn’t think that I needed it locally. But obviously, I must have created the feature branch locally at some point, probably a month ago so I’d forgotten I’d done so.) At this point I realized I had a problem. I’d deleted the feature branch in the remote through the browser while logged into Azure DevOps Services. And I’d forgotten that I had a local version of the feature branch. So, I then thought all I needed to do was delete the local feature branch. Only now Git probably thinks it wasn’t to notify the remote that the feature branch is gone, but it can’t because the remote doesn’t have it, either. ARGH!!! Although I’ve been using Git for about 3 years, there are still times when what I expect to happen is wrong.