Is there any way to check what branches have been rebased against master

So I have a project with 44 branches, not critical, but not clean as well.

Hence my question, how to check what branches have been rebased against master. So I can go and delete branches one by one.

  • How do you get git repos name in some git repository?
  • Show Git version in R Code
  • Github: Push changes from one repo to another
  • how to share odt/doc documents over git
  • What does the small preceding red minus icon mean in my Visual Studio Solution Explorer?
  • Use Xcode 4 as Git difftool
  • Problem cloning a single SVN Branch via git svn
  • Partially stage files with Visual Studio
  • Git log out user from command line
  • Get commit list between tags in git
  • Github Pages: Scripts from vendor directory are not getting loaded
  • Git push branch error after pull rebase
  • One Solution collect form web for “Is there any way to check what branches have been rebased against master”

    I think perhaps you mean merged instead of rebased? Because if what you really want to check is that some branch are rebased against the latest of the master branch, then you just run gitk --all and you will clearly see all branches that are based on the latest commit on master. But then it does not make sense to delete those branches.

    So, assuming that you want to check what branches contain changes that already exists in the master branch and thus provides no additional value and can be deleted, this is how I approach that problem. Let’s say that one of the branches is named bugfix42. Then I would run

    git branch bugfix42.test bugfix42
    git rebase master bugfix42.test
    git diff master bugfix42.test

    If this applies cleanly and there is no diff, then clearly the contents of the bugfix42 branch is already present on master and bugfix42 can be deleted. Pick the low hanging fruits first, so if you get a merge conflict just skip it for the time being with git rebase --abort and move on to the next branch. When all the trivial branches are done, then you can run again with the remaining branches and resolve the conflicts that occurs (depending on how much effort you want to put in). At the end (or before if you want) delete all the *.test branches.

    Git Baby is a git and github fan, let's start git clone.