How can I find out what branches are on QA and not production?

  • Page Owner: Not Set
  • Last Reviewed: 2022-04-07

I'd like to use git to see branches merged into QA, but not Main, How can I do that?


Answer

The maybe not so elegant way I've done this is:

  1. Make sure your local git knows about all remote branches: git fetch --all
  2. Get a list of branches merged into QA on your clipboard: git checkout qa; git pull; git branch -r --merged | clip
  3. Paste that into a diffing tool.
  4. Do the same for main: git checkout main; git pull; git branch -r --merged | clip
  5. Paste into the other panel of your diffing tool.

Compare the branches in your tool. This is usually a pretty quick way to get a good visual representation.

WinMerge example of comparing branches