{"id":18074546,"url":"https://github.com/brasic/fixdown","last_synced_at":"2026-03-05T18:04:09.937Z","repository":{"id":145890577,"uuid":"554425742","full_name":"brasic/fixdown","owner":"brasic","description":"Let `git commit --amend` reach into the mists of time","archived":false,"fork":false,"pushed_at":"2023-02-03T15:04:28.000Z","size":12,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-07T02:41:58.426Z","etag":null,"topics":["fixup","git","rebase"],"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/brasic.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"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}},"created_at":"2022-10-19T19:47:10.000Z","updated_at":"2024-04-09T10:28:53.000Z","dependencies_parsed_at":null,"dependency_job_id":"e8af3ede-78ee-4126-91b9-4db1071920a0","html_url":"https://github.com/brasic/fixdown","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/brasic/fixdown","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brasic%2Ffixdown","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brasic%2Ffixdown/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brasic%2Ffixdown/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brasic%2Ffixdown/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/brasic","download_url":"https://codeload.github.com/brasic/fixdown/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brasic%2Ffixdown/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30141306,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-05T16:58:46.102Z","status":"ssl_error","status_checked_at":"2026-03-05T16:58:45.706Z","response_time":93,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["fixup","git","rebase"],"created_at":"2024-10-31T10:14:05.778Z","updated_at":"2026-03-05T18:04:09.929Z","avatar_url":"https://github.com/brasic.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# fixdown\n\n_Let `git commit --amend` reach into the mists of time_\n\n---\n\n## Installation\n\nCopy into your $PATH.\n\n## What's this?\n\nOne git workflow I use involves frequently rebasing. After a messy\ninitial phase I have my PR shaped into roughly the commits that tell the\nstory of the change I'm making, and hopefully made it as reviewable as\npossible, for example by cabining less interesting commits that mostly\nconsist of vendored or autogenerated files into their own commits that\ncan be ignor^H^H^H^H^Hcarefully given specific attention.\n\n    $ git log --oneline\n    5e6ccba Paperwork\n    06fb676 Deal with butterfly-effect test failures\n    51d0d53 Add metrics and deploy safety valves\n    6d08e46 Use the new useful thing in various places\n    f6c893f Introduce something useful\n    e16fcb4 Scaffolding and vendored files\n\nOften this phase ends up lasting longer than expected, and I need to\nmake many changes to basically all of these commits. Since I care about\nmy carefully crafted commit log, of course that means I'm going to use\n`git-rebase` to apply those changes to the original commits so I don't\nend up asking reviewers and archaeologists to wade through something\nlike\n\n    $ git log --oneline\n    3032029 total refactor\n    ed8d317 autocorrect everything\n    dda23ca wip\n    5c20c2f I love linters\n    9bdd483 Does it work now?\n    c75cde8 Once more\n    1a37271 Try to fix a test\n    e16fcb4 Nicely crafted commit\n\nCommits like those are often a necessary part of the development\nprocess, but IMHO they don't belong in the final PR. So I rebase them\naway once they've settled.\n\nUnfortunately if you're not careful doing this a lot can distort the\noriginal commits and cause many git conflicts, especially if you're\nchanging files that have a lot of upstream activity that you're also\nintegrating with rebase. You make things a lot easier on yourself if you\nuse the `--fixup` option when committing and then `--autosquash` when\nrebasing to apply each fixup on top of the most recent change to that\nfile.\n\n    $ git commit --fixup 06fb676 test/   -m 'few more test fixes'\n    $ git commit --fixup e16fcb4 vendor/ -m 'upgrade dep to latest version'\n    $ git commit --fixup f6c893f src/    -m 'comment typo in main change'\n    $ git commit --fixup 06fb676 test/   -m 'o no more tests'\n    $ git rebase origin/main -i --autosquash\n      1 pick e16fcb4 Scaffolding and vendored files\n      2 fixup 0000389 fixup! Scaffolding and vendored files            # upgrade dep to latest version\n      3 pick f6c893f Introduce something useful\n      4 fixup 0000389 fixup! Scaffolding and vendored files            # comment typo in main change\n      5 pick 6d08e46 Use the new useful thing in various places\n      6 pick 51d0d53 Add metrics and deploy safety valves\n      7 pick 06fb676 Deal with butterfly-effect test failures\n      8 fixup 05c38c8 fixup! Deal with butterfly-effect test failures  # few more test fixes\n      9 fixup 05c38c8 fixup! Deal with butterfly-effect test failures  # o no more tests\n     10 pick 5e6ccba Paperwork\n     11\n     12 # (10 commands)\n    .git/rebase-merge/git-rebase-todo [unix GITREBASE] [0001,0001,1][10%]\n    :wq\n    Successfully rebased and updated refs/heads/topic.\n\nAfter that rebase, all the fixups are still there but my original commit\nstructure is still intact.\n\nThis is a fun workflow! It feels like a generalization of repeatedly\nfixing things with `git commit --amend --no-edit .`, which I'm also a\nbig fan of.\n\nSo that works great, but it's kind of annoying to keep tracking down\nwhat the most recent commit to have modified a file so you can pass it\nto `--fixup`. This script automates that process: for each modified file\nin your working tree it creates a single commit marked as a fixup of the\nlast commit which modified that file. Doing this lets you flush all the pending\nchanges in your tree as amendments to the relevant commits in just two commands\nwith a guarantee of no conflicts (unless they came from upstream):\n\n    $ fixdown\n    # [info about commits being made]\n    $ git rebase --autosquash origin/main\n    # all done 🎉\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrasic%2Ffixdown","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbrasic%2Ffixdown","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrasic%2Ffixdown/lists"}