3

Git is able to pick up the merged branches and we can delete them but in some cases, let's say you have a bunch of branches which were rebased before a merge and its tracking branch at remote wasn't updated. Now this local branch was deleted as well.

Any way to figure out which branches on remote are the ones that are safe to delete?

random
  • 9,774
  • 10
  • 66
  • 83
Ashfame
  • 1,731
  • 1
  • 25
  • 42
  • 2
    Everyone has marked the question as duplicate without actually reading it that my question is once I have rebased the branches, how can I still find merged branches when SHA hashes of commits have changed. Voting for reopening. – Ashfame Dec 05 '13 at 05:10

1 Answers1

0

The easiest thing to do would be recreate local tracking branches for all those remotes.

You can then run something like the following to show all commits in any of the local branches that are not in the master branch of some remote:

git log master --not --remotes=*/master 
idlethread
  • 1,111
  • 7
  • 16