I work on a repo with a fast-moving master branch and it gets pretty tedious typing
git switch master
git pull
git switch add_tests
git rebase master
git switch implement_feature
git rebase master
git switch implement_another_feature
git rebase master
git switch fix_bug
git rebase master
...
This program tries to do that for you. If there's a conflict it tries to rebase the branch as far as it can without conflicts. It's sort of finished.
Download a binary release from the Github releases page, or you can run
cargo install autorebase
Simply run autorebase in your repo. This will perform the following actions
master, by pulling it with --ff-only unless you have it checked out..git/autorebase (this is currently never deleted but you can do it manually with git worktree remove autorebase_worktree).master.master, then mark the branch as "stuck" so it isn't attempted in future. To "unstick" it, rebase manually or add more commits to the branch.Full usage is:
autorebase [--onto <target_branch>]
<target_branch> is master by default. If you develop on develop you probably want autorebase --onto develop.
git on the command line rather than through a library like libgit2, which probably isn't super robust.autorebase track my_branch at some point. Maybe.git worktree.master if it is checked out.It's possible to solve do the latter two limitations simply by doing the rebase/pull in the worktree where they are checked out (probably only the tree is clean) but I haven't done it yet. I'll see how annoying it is.