{"id":15645037,"url":"https://github.com/abhinav/restack","last_synced_at":"2025-04-05T06:08:29.972Z","repository":{"id":25708881,"uuid":"106304167","full_name":"abhinav/restack","owner":"abhinav","description":"Teaches git rebase --interactive about your branches.","archived":false,"fork":false,"pushed_at":"2025-03-24T11:51:43.000Z","size":437,"stargazers_count":64,"open_issues_count":2,"forks_count":1,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-03-24T12:41:38.898Z","etag":null,"topics":["git"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/abhinav.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-10-09T15:52:54.000Z","updated_at":"2025-03-24T11:51:46.000Z","dependencies_parsed_at":"2024-02-05T19:34:09.319Z","dependency_job_id":"41f31feb-d7b3-4710-8d73-cf92af4384f5","html_url":"https://github.com/abhinav/restack","commit_stats":{"total_commits":255,"total_committers":6,"mean_commits":42.5,"dds":0.2431372549019608,"last_synced_commit":"1767ccd1139c74e312ff9a9726519f87807bd325"},"previous_names":[],"tags_count":17,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abhinav%2Frestack","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abhinav%2Frestack/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abhinav%2Frestack/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abhinav%2Frestack/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/abhinav","download_url":"https://codeload.github.com/abhinav/restack/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247294539,"owners_count":20915340,"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":["git"],"created_at":"2024-10-03T12:04:09.154Z","updated_at":"2025-04-05T06:08:29.956Z","avatar_url":"https://github.com/abhinav.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 📚 restack [![CI](https://github.com/abhinav/restack/actions/workflows/build.yml/badge.svg)](https://github.com/abhinav/restack/actions/workflows/build.yml) [![Crate](https://img.shields.io/crates/v/restack.svg)](https://crates.io/crates/restack) [![codecov](https://codecov.io/gh/abhinav/restack/branch/main/graph/badge.svg)](https://codecov.io/gh/abhinav/restack/tree/main)\n\nrestack augments the experience of performing an interactive Git rebase to make\nit more friendly to workflows that involve lots of interdependent branches.\n\nFor more background on why this exists and the workflow it facilitates, see\n[Automatically Restacking Git Branches][1].\n\n  [1]: https://abhinavg.net/posts/restacking-branches/\n\n## Installation\n\nUse one of the following options to install restack.\n\n- If you use **Homebrew** on macOS or **Linuxbrew** on Linux, run the following\n  command to download and install a pre-built binary.\n\n    ```\n    brew install abhinav/tap/restack\n    ```\n    \n- If you use **ArchLinux**, install it from AUR\n  using the [restack-bin package] package for a pre-built binary\n  or the [restack package] package to build it from source.\n\n    ```\n    git clone https://aur.archlinux.org/restack-bin.git\n    cd restack-bin\n    makepkg -si\n    ```\n\n  With an AUR helper like [yay], run the following instead:\n\n    ```\n    yay -S restack-bin # pre-built binary\n    yay -S restack     # build from source\n    ```\n\n- Download a pre-built binary from the [GitHub Releases] page and place it on\n  your `$PATH`.\n\n- Build it from source if you have Rust installed.\n\n    ```\n    cargo install restack\n    ```\n\n  [restack-bin package]: https://aur.archlinux.org/packages/restack-bin\n  [restack package]: https://aur.archlinux.org/packages/restack\n  [yay]: https://github.com/Jguer/yay\n  [GitHub Releases]: https://github.com/abhinav/restack/releases\n\n## Setup\n\nrestack works by installing itself as a Git [`sequence.editor`].\nYou can set this up manually or let restack do it for you automatically.\n\n  [`sequence.editor`]: https://git-scm.com/docs/git-config#Documentation/git-config.txt-sequenceeditor\n\n### Automatic Setup\n\nRun `restack setup` to configure `git` to use `restack`.\n\n    restack setup\n\n### Manual Setup\n\nIf you would rather not have restack change your `.gitconfig`,\nyou can set it up manually by running:\n\n```\ngit config sequence.editor \"restack edit\"\n```\n\nSee `restack edit --help` for the different options accepted by `restack edit`.\n\n## Usage\n\nrestack automatically recognizes branches being touched by the rebase and adds\nrebase instructions which update these branches as their heads move.\n\nThe generated instruction list also includes an opt-in commented-out section\nthat will push these branches to the remote.\n\nFor example, given,\n\n    o master\n     \\\n      o A\n      |\n      o B (feature1)\n       \\\n        o C\n        |\n        o D (feature2)\n         \\\n          o E\n          |\n          o F\n          |\n          o G (feature3)\n           \\\n            o H (feature4, HEAD)\n\nRunning `git rebase -i master` from branch `feature4` will give you the\nfollowing instruction list.\n\n    pick A\n    pick B\n    exec git branch -f feature1\n\n    pick C\n    pick D\n    exec git branch -f feature2\n\n    pick E\n    pick F\n    pick G\n    exec git branch -f feature3\n\n    pick H\n\n    # Uncomment this section to push the changes.\n    # exec git push -f origin feature1\n    # exec git push -f origin feature2\n    # exec git push -f origin feature3\n\nSo any changes made before each `exec git branch -f` will become part of that\nbranch and all following changes will be made on top of that.\n\n## Credits\n\nThanks to [@kriskowal] for the initial implementation of this tool as a\nscript.\n\n  [@kriskowal]: https://github.com/kriskowal\n  \n## FAQ\n\n### Can I make restacking opt-in?\n\nIf you don't want restack to do its thing on every `git rebase`,\nyou can make it opt-in by introducing a new Git command.\n\nTo do this, first make sure you don't have restack set up for the regular\n`git rebase`:\n\n```\ngit config --global --unset sequence.editor\n```\n\nNext, create a file named `git-restack` with the following contents.\n\n```bash\n#!/bin/bash\nexec git -c sequence.editor=\"restack edit\" rebase -i \"$@\"\n```\n\nMark it as executable and place it somewhere on `$PATH`.\n\n```\nchmod +x git-restack\nmv git-restack ~/bin/git-restack\n```\n\nGoing forward, you can run `git rebase` for a plain rebase,\nand `git restack` to run a rebase with support for branch restacking.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabhinav%2Frestack","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fabhinav%2Frestack","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabhinav%2Frestack/lists"}