{"id":18471918,"url":"https://github.com/codemouse92/branch-detective","last_synced_at":"2025-04-08T11:32:22.510Z","repository":{"id":62560414,"uuid":"457944340","full_name":"CodeMouse92/branch-detective","owner":"CodeMouse92","description":"Find which commits are missing between branches.","archived":false,"fork":false,"pushed_at":"2022-08-22T14:15:20.000Z","size":22,"stargazers_count":11,"open_issues_count":2,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-23T12:04:01.414Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/CodeMouse92.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-02-10T20:55:30.000Z","updated_at":"2025-03-13T13:07:22.000Z","dependencies_parsed_at":"2022-11-03T14:30:27.813Z","dependency_job_id":null,"html_url":"https://github.com/CodeMouse92/branch-detective","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CodeMouse92%2Fbranch-detective","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CodeMouse92%2Fbranch-detective/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CodeMouse92%2Fbranch-detective/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CodeMouse92%2Fbranch-detective/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CodeMouse92","download_url":"https://codeload.github.com/CodeMouse92/branch-detective/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247834069,"owners_count":21003909,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-06T10:18:25.355Z","updated_at":"2025-04-08T11:32:22.115Z","avatar_url":"https://github.com/CodeMouse92.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Branch Detective\n\nAre you baffled by backports? Confused by cherry-picks? Muddled by merges?\nBranch Detective is the easy way to see what commits are present in one\nbranch and absent from the other.\n\nTo use, just run `branch-detective` from the Git repository you're\nexamining, and pass the two branches you're comparing. The first branch is\nthe **source** branch, where commits are coming *from*. The second branch\nis the **destination** branch, which you're search through for the commits in.\nIf a commit is present in source, but not in destination, that commit is\nconsidered \"missing\".\n\nIf you don't specify the source, the current branch will be used, and if you don't\nspecify the destination, the local copy of the default branch (e.g. `main`) will be\nused. Thus, `branch-detective` without any arguments will display the commits present\nin the current branch, but absent from `main`.\n\nTo keep things simple, Branch Detective will not tell you about commits\npresent in the destination branch, but not in the source branch. To see these,\nrerun Branch Detective with the branches swapped.\n\n## Pretty PR Descriptions!\n\nYou can output the list of commits in Markdown format, for copying and pasting\nas your Pull Request/Merge Request description. Just pass the `--markdown`\nor `-m` option.\n\nIf all your commits consist either of a single line _or_ have a blank line between\nthe header line and the body of the commit, then the first line will be formatted\nas a heading 2 (`## like this`). If your commits don't follow this structure,\nhorizontal rules with dashes will be used to separate commits instead (`-----`).\n\n## Search by Message or SHA\n\nDifferent Git platforms handle your repository in different ways. In some,\nit is possible to directly compare the unique SHAs of commits in different\nbranches. However, in many cases, these SHAs are changed through merges,\ncherry-picks, rebases, and other history-altering changes.\n\nBy default, Branch Detective uses the **commit message** to determine if two\ncommits are identical. It also knows how to ignore \"cherry pick\" footers\nto minimize false positives for missing commits.\n\nIf you prefer, you can pass the argument `--by-sha` to compare by\n**commit SHA** instead. This will check for commits in the destination\nbranch that match the SHA either directly or via the cherry pick footer.\nThus, if commit `a1b2c3` is cherry-picked from the source branch into\nthe destination branch, while it will actually have a different SHA, it will\nbe considered a match by Branch Detective, since the cherry pick footer will\ncontain the source SHA `a1b2c3`.\n\n## Ignore Merges...or Don't\n\nIf your Git platform generates merge commits *in addition* to the regular\ncommits themselves, Branch Detective allows you to ignore merge commits\naltogether. This cuts through the muck of the merge process and shows you only\nthose missing commits that actually contain real code changes.\n\nBy default, merge commits are considered. To ignore merge commits, pass the\n`--ignore-merge` flag.\n\n## Since When?\n\nIf you want to only inspect commits in a particular time range, you can use\nthe `--since` and/or `--before` options. For both, pass a date in the form\n`YYYY-MM-DD` (e.g. `--since 2022-01-01` or `--before 2021-05-04`).\n\n## Show Some or Show All\n\nBy default, Branch Detective shows you one commit at a time, and waits for\nyou to hit enter to continue. However, if you want to see all the commits\nat once, such as if you're exporting the output to a file, pass the\n`--show-all` or `-a` flag to show all the missing commits at once.\n\n```bash\nbranch-detective devel main --show-all\n```\n\n## Potential Pitfalls\n\nBranch Detective either looks at the commit message or the SHA. To minimize\nfalse positives or false negatives due to workflow, we ignore dates and authors\nas part of commit matching.\n\nThis does mean that if you have multiple commits with the same message, if\nonly one is present in the destination branch, it will not see *any* of the\ncommits in the source branch with the matching commit message as missing.\n\n## Installing Branch Detective\n\nYou can install Branch Detective directly from [PyPI][2] via pip.\n(We recommend you do this in a virtual environment.)\n\n```bash\npip install branch-detective\n```\n\n## Found a Bug? Need a Feature?\n\nPlease report bugs and missing features on the\n[Branch Detective repository][1]. Pull requests are also encouraged!\n\n[1]: https://github.com/codemouse92/branch-detective\n[2]: https://pypi.org/project/branch-detective/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodemouse92%2Fbranch-detective","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodemouse92%2Fbranch-detective","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodemouse92%2Fbranch-detective/lists"}