Crates.io | git-quickfix |
lib.rs | git-quickfix |
version | 0.1.0 |
source | src |
created_at | 2020-09-23 07:01:14.601693 |
updated_at | 2022-06-21 02:46:16.53565 |
description | A small utility to apply patches outside of the current branch. |
homepage | https://github.com/siedentop/git-quickfix |
repository | https://github.com/siedentop/git-quickfix |
max_upload_size | |
id | 291992 |
size | 78,892 |
Quickfix allows you to commit changes in your git repository to a new branch without leaving the current branch.
I have often written a patch for some minor blemish that caught my attention. I found it annoying to have to stage my main changes, switch to a new branch created off the main branch, commit and push the patch and then switch back to the original branch.
Commit the changes.
git quickfix --push <new_branch>
<new_branch>
based-off origin/main
(or whatever the remote default branch is).--push
if you do not want to push the new branch to origin.git quickfix --help
provides more options.
--onto <branch>
you can modify the branch from which <new_branch>
is based-off.--remove
the last commit will be removed from the original branch.--autostash
if you have local changes that you want to temporarily stash.The cherry-pick is done in memory. This means your working directory will not be modified.
The quickfix commit will be kept (changed in v0.0.5) unless --remove
is provided.
You can use Cargo to install quickfix.
Cargo is available for all major platforms. How to install Cargo is described here: https://doc.rust-lang.org/cargo/getting-started/installation.html
cargo install git-quickfix
Default branches from origin are picked up through a hard-coded list. Patches
welcome. If the default branch on the remote is not called main, master,
devel, or develop, you have to supply it manually. Similarly, if the remote is not
called 'origin' you will also have to supply the branch name manually using the
--onto
option. Please create an issue if this bothers you.
Won't fix: --push
use the shell to push the changes. Benefits: All proxy,
auth and other configs are picked up. But if does not feel right.
git absorb
: https://github.com/tummychow/git-absorbgit trim
: https://github.com/foriequal0/git-trim