Welcome to Software Development on Codidact!
Will you help us build our independent community of developers helping developers? We're small and trying to grow. We welcome questions about all aspects of software development, from design to code to QA and more. Got questions? Got answers? Got code you'd like someone to review? Please join us.
Post History
From the command line, the following command will give you a list of all authors who have made local-only commits to a branch some-branch: git log some-branch --not --remotes --format="%an" And...
Answer
#1: Initial revision
From the command line, the following command will give you a list of all authors who have made local-only commits to a branch `some-branch`: git log some-branch --not --remotes --format="%an" And to get a clean list of branches suitable for scripting: git branch --format="%(refname:short)" If you are working in a Bash-compatible shell (which you are if you're on macOS or Linux, in all likelihood), you can use these to make a scriptlet that prints every branch which doesn't have any local-only commits not authored by some set of names: for b in $(git branch --format="%(refname:short)") do git log "$b" --not --remotes --format="%an" | grep -qvE 'Jane Doe|Bobby Tables' || echo "$b" done (Note that this may include branches that don't have any local-only commits at all! But those are probably also decent candidates for deletion.)