{"id":13547320,"url":"https://github.com/Skydio/revup","last_synced_at":"2025-04-02T19:32:56.299Z","repository":{"id":59185511,"uuid":"449906792","full_name":"Skydio/revup","owner":"Skydio","description":"Effortlessly create and manage pull requests without changing branches. Powers a stacked diffs workflow with python and git \"plumbing\" commands.","archived":false,"fork":false,"pushed_at":"2024-04-05T20:13:51.000Z","size":1292,"stargazers_count":289,"open_issues_count":21,"forks_count":52,"subscribers_count":7,"default_branch":"main","last_synced_at":"2024-04-05T21:25:15.177Z","etag":null,"topics":["code-review","developer-productivity","developer-tools","developers","git","github","pull-requests","python","python3","stacked-diffs","version-control","workflow"],"latest_commit_sha":null,"homepage":"https://github.com/Skydio/revup","language":"Python","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/Skydio.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}},"created_at":"2022-01-20T00:59:26.000Z","updated_at":"2024-04-15T11:20:04.489Z","dependencies_parsed_at":"2023-12-21T00:01:28.879Z","dependency_job_id":"a7023a86-229f-44a2-8ebf-01a338d90b65","html_url":"https://github.com/Skydio/revup","commit_stats":{"total_commits":59,"total_committers":9,"mean_commits":6.555555555555555,"dds":0.288135593220339,"last_synced_commit":"fa4e5a9a4a58cad84663346d51812a5fff183cb0"},"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Skydio%2Frevup","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Skydio%2Frevup/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Skydio%2Frevup/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Skydio%2Frevup/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Skydio","download_url":"https://codeload.github.com/Skydio/revup/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246880325,"owners_count":20848841,"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":["code-review","developer-productivity","developer-tools","developers","git","github","pull-requests","python","python3","stacked-diffs","version-control","workflow"],"created_at":"2024-08-01T12:00:53.872Z","updated_at":"2025-04-02T19:32:56.282Z","avatar_url":"https://github.com/Skydio.png","language":"Python","readme":"\u003cp align=\"center\"\u003e\n\u003c!-- PYPI_REMOVE --\u003e\n\u003cpicture\u003e\n  \u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"docs/images/revup_dark.svg\"\u003e\n  \u003csource media=\"(prefers-color-scheme: light)\" srcset=\"docs/images/revup_light.svg\"\u003e\n\u003c!-- /PYPI_REMOVE --\u003e\n  \u003cimg alt=\"Revup\" src=\"docs/images/revup_light.svg\"/\u003e\n\u003c!-- PYPI_REMOVE --\u003e\n\u003c/picture\u003e\n\u003c!-- /PYPI_REMOVE --\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n\u003ca href=\"https://github.com/Skydio/revup\"\u003e\u003cimg alt=\"Source Code\" src=\"https://img.shields.io/badge/source-code-blue\"/\u003e\u003c/a\u003e\n\u003ca href=\"https://github.com/Skydio/revup/issues\"\u003e\u003cimg alt=\"Issues\" src=\"https://img.shields.io/badge/issue-tracker-blue\"/\u003e\u003c/a\u003e\n\u003cimg alt=\"Python 3.8 | 3.9 | 3.10\" src=\"https://img.shields.io/pypi/pyversions/revup\"/\u003e\n\u003ca href=\"https://pypi.org/project/revup/\"\u003e\u003cimg alt=\"PyPI\" src=\"https://img.shields.io/pypi/v/revup\"/\u003e\u003c/a\u003e\n\u003ca href=\"https://github.com/Skydio/revup/tree/main/LICENSE\"\u003e\u003cimg alt=\"MIT License\" src=\"https://img.shields.io/pypi/l/revup\"/\u003e\u003c/a\u003e\n\u003c/p\u003e\n\nRevup provides command-line tools that allow developers to iterate faster on parallel changes and reduce the overhead of creating and maintaining code reviews.\n\n\u003cp align=\"center\"\u003e\n\u003cimg alt=\"intro_gif\" src=\"docs/images/tutorial_1.gif\"/\u003e\n\u003c/p\u003e\n\n# Features\n\n- Revup creates multiple independent chains of branches for you in the background and without touching your working tree. It then creates and manages github pull requests for all those branches.\n- Pull requests target the actual base branch and can be merged manually or by continuous integration\n- Rebase detection saves time and continuous integration cost by not re-pushing if the patch hasn't changed\n- Adds reviewers, labels, and creates drafts all from the commit text\n- Adds auto-updating \"review graph\" and \"patchsets\" elements to make pull requests easier to navigate\n- `revup amend` and `revup restack` save time by replacing slow rebases\n\n# Compatibility\n\nRevup requires python 3.8 or higher and git 2.43 or higher. Revup works with Linux, OSX, and Windows (limited testing).\n\nFollow instructions [here](https://git-scm.com/downloads) to get the latest git version for your OS. Revup uses flags only present in newer git versions.\n\n# Installing\n\nInstall with `pip` or your favorite package manager.\n\n```sh\npython3.8 -m pip install revup\n```\n\nVerify that installation was successful by showing the help page.\n\n```sh\nrevup -h\n```\n\nYou can also build from source to get the latest updates.\n\n```\ngit clone https://github.com/Skydio/revup.git \u0026\u0026 cd revup\nmake deps \u0026\u0026 make package \u0026\u0026 make install\n```\n\n# Tutorial\n\nThis tutorial will guide you through using basic revup features.\n\n## First time setup\n\nClone a sandbox repo by [forking](https://github.com/Skydio/revup/fork) revup, creating a [new](https://github.com/new) repo, or using some other repo you own.\nCreating test PRs can be spammy so don't do the tutorial on other people's repos.\n\n```sh\ngit clone https://github.com/\u003cyour-name\u003e/revup.git \u0026\u0026 cd revup\n```\n\nOn first run, you will need to configure github credentials. Create a [GitHub Personal Access Token](https://github.com/settings/tokens/new?scopes=repo)\nwith \"repo\" scope. Revup needs this in order to create and modify pull requests. Then run\n```sh\nrevup config github_oauth\n```\nand copy and paste the oauth into the prompt.\n\n## Create independent pull requests\n\nMake your first two commits that will become two separate pull requests.\nNote the \"Topic:\" tag in the commit message - this is what causes revup to recognize and act on a commit.\nEach separately named topic will become a new pull request.\n\n```sh\necho meh \u003e foo; git add foo\ngit commit -m \"My first revup foo\" -m \"Topic: foo\"\necho peh \u003e bar; git add bar\ngit commit -m \"My first revup bar\" -m \"Topic: bar\"\n\nrevup upload\n```\n\n![tutorial_1](docs/images/tutorial_1.gif)\n\nYou've uploaded your first revup changes! Notice how in github, both branches target 'main'. This allows them to be merged independently.\n\n\u003cimg src=\"docs/images/foo_github.png\" width=\"50%\"\u003e\u003cimg src=\"docs/images/bar_github.png\" width=\"50%\"\u003e\n\nUnder the hood, revup creates and pushes these branches for you, tracking and managing the dependencies as needed.\n\n## Create relative pull requests\n\nNow we'll make a new review that's relative to \"foo\". The \"Relative\" tag will ensure the new review targets the correct branch.\n\n```sh\necho deh \u003e\u003e foo; git add foo\ngit commit -m \"My second revup foo\" -m \"Topic: foo2\" -m \"Relative: foo\"\n\nrevup upload\n```\n\n![tutorial_2](docs/images/tutorial_2.gif)\n\nWith this simple but powerful model, you can upload independent and dependent changes all at once.\n\n- Multiple commits can be in one topic, in which case they will all be in a single pull request.\n- Commits in the same topic do not need to be adjacent in history.\n- Topics relative to each other do not need to be adjacent in history, but the second topic must come after the first.\n\n## Modify pull requests\n\nNow let's update a pull request.\n\n```sh\necho heh \u003e\u003e bar; git add bar\n# Either\nrevup amend HEAD~ --no-edit  # Specify a commit to amend\n# or\nrevup amend bar --no-edit  # Specify a topic name to amend\n\nrevup upload\n```\n\n![tutorial_3](docs/images/tutorial_3.gif)\n\n`revup amend` makes it easy to modify commits in your history. You also have other options for modifying reviews:\n\n- Adding new commits with the same topic\n- Using `git rebase --interactive` along with `git commit --amend`\n\n## Pulling in upstream changes\n\nUse `git pull --rebase` to pull in changes. Don't use `git merge` or `git pull` without rebase as this creates a merge commit.\n\nBy default revup will not upload if you pull but haven't made changes to a commit. To override this and upload always, run `revup upload --rebase`.\n\n```\n[pull]\n    rebase = true\n[rebase]\n    autoStash = true\n```\nWe recommend adding the above to `.gitconfig` to make pulling and rebasing easier.\n\n# More features\n\nThis is a non-exhaustive intro to some more handy revup features.\n\nFor a full description of features, see the [docs](https://github.com/Skydio/revup/tree/main/docs) or run `revup -h` or `revup upload -h` to view docs in `man` format.\n\n## Work with forks\n\nFor contributing to projects that you may not have push access to, revup can be configured to push to a fork while creating a pull request in the main project.\n\nAdd git remotes for both the original and fork.\n```\n$ git remote -v\norigin  https://github.com/ORIGINAL_OWNER/REPO_NAME.git (fetch)\norigin  https://github.com/ORIGINAL_OWNER/REPO_NAME.git (push)\nmyfork  https://github.com/YOUR_USERNAME/REPO_NAME.git (fetch)\nmyfork  https://github.com/YOUR_USERNAME/REPO_NAME.git (push)\n```\n\nWhen uploading, pass the remote to create the pull request in as `--remote-name` and the forked remote as `--fork-name`.\n```\nrevup --remote-name origin --fork-name myfork upload\n```\n\n## Add reviewers / labels\n\nRevup can also add reviewers, assignees, and labels to pull requests. Add the appropriate tags to any commit in a topic.\n\n```\nReviewers: alice, bob\nAssignees: eve\nLabels: bug, feature, draft\n```\n\nGithub usernames can be abbreviated and will match the shortest name with the given prefix.\n\nLabels must match exactly. The `draft` label is special and will make a pull request a draft if present and unmake draft if removed.\n\n## Working on other branches\n\nRevup normally auto-detects your local base branch and uses that to list commits and target reviews.\nYou can choose to target any particular topic to another branch or even multiple branches, in which case revup will use those as the base branch instead (and create multiple pull requests in the latter case).\n\n```\nA fix for multiple branches\n\nTopic: fix\nBranches: main, rel1.1\n```\n\nYou can specify base branch on the command line as well, although this is usually not necessary unless you're working on a branch that the autodetector doesn't know about (see Repo config below).\n\n```\nrevup upload --base-branch custom-branch-name\n```\n\n## Review graph and patchsets\n\nRevup will add 2 comments in every pull request to provide helpful features for users and reviewers. These are enabled by default and automatically updated as the pull request changes.\n\n\u003cimg src=\"docs/images/review_graph.png\" width=\"40%\"\u003e\n\nThe review graph provides links and titles to all local pull requests that have a relative relationship with the current pull request, including any that it depends on, or that depend on it. This allows you to quickly browse between pull requests in a chain.\n\n\u003cimg src=\"docs/images/patchsets.png\" width=\"80%\"\u003e\n\nThe patchsets table provides a history of uploads for a given pull request as well as links and summaries of the diff between each upload. Notably, revup specially handles\nthe case where you rebase then upload and will show you a diff with upstream files excluded.\n\n# Configuring revup\n\nRevup is highly configurable using a standard config file format. Every flag is also a config option, so users can get the exact behavior they need.\n\nFlags specified on the command line take precedence, followed by config in `~/.revupconfig`, followed by `.revupconfig` in the current repo.\n\n## Repo config\n\nThe primary usecase for the in-repo config file is setting up the naming of the main branch and release branches.\n\nFor example if your main branch is `master` and release branches are named like `rel1.1`, commit the following to `.revupconfig` in the repo root.\n\n```\n[revup]\nmain_branch = master\nbase_branch_globs =\n    rel[1-9].[0-9]\n    rel[1-9].[0-9][0-9]\n```\n\n## User config\n\nThe user config at `~/.revupconfig` saves time by defaulting the most commonly used flags.\n\nFor example, after getting used to the workflow, a user might not need the confirmation check. Adding the following lines will be the same as running with `--skip-confirm`.\n\n```\n[upload]\nskip_confirm = True\n```\n\n# Appendix\n\n## Commit based development\n\n(aka \"stacked diffs\", \"patch based\", etc)\n\nIf you've used tools such as Gerrit, Phabricator, or git mailing lists, you may already be familiar with this style of development. If you'd like to read more, here are some well written discussions on the subject.\n\n- [Stacked Diffs vs Pull Request](https://jg.gg/2018/09/29/stacked-diffs-versus-pull-requests/)\n- [In Praise of Stacked PRs](https://benjamincongdon.me/blog/2022/07/17/In-Praise-of-Stacked-PRs/)\n\n## Peer projects\n\nRevup is inspired in part by this non-exhaustive list of open source projects that also support a patch based workflow:\n\n- [ghstack](https://github.com/ezyang/ghstack): also a patched based tool integrated with github. revup builds on code from this project, especially graphql usage.\n- [git-branchstack](https://github.com/krobelus/git-branchstack): creates branches similar to `revup upload` but doesn't push or create reviews.\n- [git-revise](https://github.com/mystor/git-revise): similar to `revup amend` and the backend for the above with a merge system that handles conflicts\n\n## Contributing \u0026 support\n\nThanks for contributing to revup! You can get started with your own idea, or see the [issues](https://github.com/Skydio/revup/issues) page for ideas that other people are excited about.\n\nWhen reporting issues:\n- Check the issue tracker to see if it has already been reported.\n- Provide a description of repro steps.\n- If possible, run the same command with `revup -v` to provide verbose logs.\n\n## Disclaimer\n\nRevup is published by Skydio but is not an officially supported Skydio product.\n","funding_links":[],"categories":["Examples","Python"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FSkydio%2Frevup","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FSkydio%2Frevup","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FSkydio%2Frevup/lists"}