Removed branchs (Git), but they "continue" there, how to remove it at once?

0

Work in a team of 3 people and for each action we would create a branch; with the passage of time the number of branches created will become great, I then decided to eliminate some branchs that are no longer being used and would not even be again

I first used the command git branch -d nome_da_branch ;

While not achieving the goal, I used another command: git push origin --delete nome_da_branch ;

The idea was to remove the branch from my machine and the network of all staff;

Some branches disappeared on my local machine, but not on the personal machine that works with me; there are branches that appear to me with the option to publish ("Publish Branch");

I would like help with removing branchs; I already used the command git clean -[] [n, i, f] according to the Git documentation but nothing has happened yet;

    
asked by anonymous 19.05.2017 / 21:07

2 answers

2

To delete the remote branch:

git push nome_do_origin nome_da_branch --delete

To delete the local branch:

git branch -D nome_da_branch
    
19.05.2017 / 21:12
0

To delete a branch remote

git push orgin :nome_da_branch

To remove the reference from the branch of the other developers each one will have to enter the command:

git fetch -pt

The -pt option of the fetch command is the join of the -p and -t .

Local removal should occur on each machine:

git branch -D <minha_branch>
    
24.07.2017 / 17:30