On your local branches normally you have a stale branch where it doesn’t have corresponding remote branch and you feel like you want to make it in sync with the remote branches
1. Lets start listing the remote branch first just to know what are the branches available remotely
[code language=”bash”]
$ git remote show origin
[/code]
2. Lets see our local stale branches “–dry-run” command will just display the stale branch but without deleting it
[code language=”bash”]
$ git remote prune origin –dry-run
[/code]
3. Alternatively if you want to really delete the stale branches you can run it without “–dry-run” command
[code language=”bash”]
$ git remote prune origin
[/code]
*just make sure you already committed your feature branch to the remote before doing this