Pruning remote branches
Often, the development of a software project tracked by Git happens on feature branches, and, as time goes by, an increasing number of feature branches are merged to the mainline. Usually, these feature branches are deleted in the main repository (the origin). However, branches are not automatically deleted from all clones while fetching and pulling request. Git must explicitly be told to delete branches from the local repository that have been deleted from the origin.
Getting ready
First, we'll set up two repositories and use one of them as a remote for the other. We will use the Git-Version-Control-Second-Edition_hello_world_flow_model
repository, but first we'll clone a repository to a local bare repository:
$ git clone --bare https://github.com/PacktPublishing/Git-Version-Control-Cookbook-Second-Edition_hello_world_flow_model.git hello_world_flow_model_remote Cloning into bare repository 'hello_world_flow_model_remote'... remote: Counting objects: 51, done. remote...