I have a local and a remote Git repository.
In my local repository I create and switch to a new branch:
git checkout -b feature/niceNewFeature
I do my coding,
git add .
,git commit
andgit push
myfeature/niceNewFeature
branch to the remote repository (e.g. GitHub).After this I create a GitHub Pull Request to merge
feature/niceNewFeature
branch intomaster
- after the code is reviewed, I will do so.Since
feature/niceNewFeature
is now merged tomaster
, I will delete it on GitHub.However, in my local repository, feature/niceNewFeature branch is still listed if I execute
git branch
command.
How do I remove feature/niceNewFeature
branch from my local repository, since it is already merged to master
and deleted from the remote repository?