{"id":17210147,"url":"https://github.com/mockdeep/baes","last_synced_at":"2025-09-03T13:14:40.274Z","repository":{"id":36977010,"uuid":"502740402","full_name":"mockdeep/baes","owner":"mockdeep","description":"a simple tool for bulk rebasing branches","archived":false,"fork":false,"pushed_at":"2025-08-04T06:27:29.000Z","size":189,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-08-04T09:41:31.356Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mockdeep.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2022-06-12T22:18:18.000Z","updated_at":"2025-08-04T06:27:31.000Z","dependencies_parsed_at":"2023-01-17T11:01:01.332Z","dependency_job_id":"99f0eda0-a437-4dcb-a088-8726bbe49a62","html_url":"https://github.com/mockdeep/baes","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/mockdeep/baes","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mockdeep%2Fbaes","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mockdeep%2Fbaes/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mockdeep%2Fbaes/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mockdeep%2Fbaes/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mockdeep","download_url":"https://codeload.github.com/mockdeep/baes/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mockdeep%2Fbaes/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273448386,"owners_count":25107554,"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","status":"online","status_checked_at":"2025-09-03T02:00:09.631Z","response_time":76,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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-10-15T02:53:30.590Z","updated_at":"2025-09-03T13:14:40.230Z","avatar_url":"https://github.com/mockdeep.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Baes\n\nWelcome to your new gem! In this directory, you'll find the files you need to\nbe able to package up your Ruby library into a gem. Put your Ruby code in the\nfile `lib/baes`. To experiment with that code, run `bin/console` for an\ninteractive prompt.\n\nTODO: Delete this and the text above, and describe your gem\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem 'baes'\n```\n\nAnd then execute:\n\n    $ bundle install\n\nOr install it yourself as:\n\n    $ gem install baes\n\n## Usage\n\nTODO: Write usage instructions here\n\n### Anatomy of a Rebase\n\nLet’s imagine we have the following chain of branches:\n\n```\nmain\n  branch_01 # based on main\n    branch_02 # based on branch_01\n      branch_03 # based on branch_02\n```\n\nWe can say the top commit on `main` has hash `m1`. `branch_01` will have `a1`,\n`branch_02` will have `a1,b1`, and `branch_03` has `a1,b1,c1`.\n\nNow let’s say we rebase merge `branch_01` onto `main`. If we rebase or squash\ncommits onto another branch, it actually generates a _new_ commit hash, even if\nthe code changes are the same. So `main` will have hashes `m1,a2`, where `a2`\nis a new hash for the same changes as `a1`. In this scenario, `branch_02` will\nstill have commits `a1,b1` even though `main` has an equivalent commit `a2`. So\nwhat do we do? We rebase!\n\n```\ngit rebase main branch_02\n```\n\nThere are a series of possible outcomes.\n\n1. It tosses commit `a1` because it has no changes from what is on `main`. Here\n   we are left with a new `b2` commit hash on `branch_02`.\n2. Maybe you made some slight changes to `branch_01` based on feedback. When\n   you rebase you end up with a conflict! Well, in this case the conflict is\n   easy to resolve if it’s on `a1`. You simply skip it since you only care\n   about commit `b1`: `git rebase --skip`. Then you again end up with `b2`, or\n   maybe you have a conflict there as well, which you will need to resolve\n   manually and use `git rebase --continue`.\n3. Maybe you made some major changes to `branch_01` based on feedback. Because\n   of this there is no overlap between the new `a2` on `main` and the `a1` on\n   `branch_02`. When you rebase `branch_02` on `main`, it cleanly applies the\n   changes, leaving you with `a3,b2` on `branch_02`. This is the least optimal\n   scenario, since you probably want commit `a3` to go away. You’ll need to do\n   do an interactive rebase `git rebase -i main branch_02` and manually delete\n   that commit. Thankfully, this doesn’t seem to happen all that often.\n\n`baes` helps you easily address the first two cases. It rebases _all_ of your\nbranches on the base branch (`main` by default). If it hits a conflict in the\nprocess, it will prompt you to skip this step in the rebase. If we are\nconfident we only have one commit on our branch that we care about, we can skip\nup to the top commit:\n\n```\n$ baes\nconflict rebasing branch branch_01 on main\nskip commit 1 of 2? (y/n) y\nconflict rebasing branch branch_01 on main\nskip commit 2 of 2? (y/n) n\n```\n\nThen we fix the code and run `git rebase --continue`. This enables you to have\nlong chains of branches without nearly as much of the tedium of handling rebase\nconflicts. If that’s still not fast enough for you and you’re feeling daring,\nyou can run with the `--auto-skip` flag, which will automatically skip and only\nstop on the top commit. This has the caveats that 1) you should be sure you\nonly have one commit on each branch and 2) you don’t have any one-off branches\nwith a bunch of commits that might conflict, as it’ll skip those. The upshot is\nthat on a branch like that you’ll probably end up with conflicts on the last\ncommit as well, so you’ll be able to abort the rebase process (`git rebase\n--abort`) and restart it from scratch to handle the conflicts manually.\n\nOnce all your branches are rebased, you can clean up any that are up to date\nwith `main`:\n\n```\ngit checkout main \u0026\u0026 git branch --merged | grep -v \"\\(main\\|master\\|staging\\)\" | xargs -r git br -d\n```\n\nYou can find a more aggressive git cleanup helper [here][gc].\n\n## Development\n\nAfter checking out the repo, run `bin/setup` to install dependencies. Then, run\n`rake spec` to run the tests. You can also run `bin/console` for an interactive\nprompt that will allow you to experiment.\n\nTo install this gem onto your local machine, run `bundle exec rake install`. To\nrelease a new version, update the version number in `version.rb`, and then run\n`bundle exec rake release`, which will create a git tag for the version, push\ngit commits and the created tag, and push the `.gem` file to\n[rubygems.org](https://rubygems.org).\n\n## Contributing\n\nBug reports and pull requests are welcome on GitHub at\nhttps://github.com/[USERNAME]/baes. This project is intended to be a safe,\nwelcoming space for collaboration, and contributors are expected to adhere to\nthe [code of\nconduct](https://github.com/[USERNAME]/baes/blob/main/CODE_OF_CONDUCT.md).\n\n## License\n\nThe gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).\n\n## Code of Conduct\n\nEveryone interacting in the Baes project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/[USERNAME]/baes/blob/main/CODE_OF_CONDUCT.md).\n\n[gc]: https://github.com/mockdeep/dotfiles/blob/414c34b6a35dd512c88fa86d4d1f896f603a5af2/bash/aliases#L123-L129\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmockdeep%2Fbaes","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmockdeep%2Fbaes","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmockdeep%2Fbaes/lists"}