Here is the workflow I've been attempting, after watching a this Git/TFS video.
So I create a branch from my development branch
$ git checkout -b my-feature-branch development
Then I make a change, stage, commit, and push the changes up to the TFS server.
Now when I go to the TFS web interface, I have a "my-feature-branch" on the server.
I click "New Pull Request" and create a PR into development, and Accept this PR. This process deletes the "my-feature-branch" on the TFS server, but it remains on my local machine.
Everything is great at this point.
Back to my local machine, switch out of the feature branch:
git checkout development
Delete the local branch
git branch -d my-feature-branch warning: deleting branch 'my-feature-branch' that has been merged to 'refs/remotes/origin/test-pr', but not yet merged to HEAD. Deleted branch my-feature-branch (was d525adc).
Get latest -
git pull -p
Sometimes, and I may be doing the pull prior to the delete, the delete Fails and I have to Force Delete it.
git branch -D my-feature-branch
Is my workflow wrong? Should I be doing some kind of merge prior to deletion? Why doesn't git know the feature branch has been merged in as a Pull Request after the pull and let me delete without error?