A fish shell plugin that provides a suite of common tasks when working on a git repository (namely in the pull request and mainline development model).
This tool is fairly coupled with GitHub as it currently exists but several of the commands just operate on git independently.
Install using Fisher:
fisher install maccoda/repo.fishUsed for a monorepo to easily switch between projects. It assumes these all live
under a projects directory.
The options will be presented in fzf with an added option of .. which will
return you to the root of the repository.
> repo cd
client
server
..Allows for a quick diff against useful presets like a tag or main branch
> repo diff mainCreates a new feature branch to work on, pulling in the latest changes on the
main branch before doing so. It also has the option of creating the branch from
the current branch with --from-current
> repo feature <branch name>Interactive search through the history log of the repository
> repo logSwitch to the main branch and fetch latest changes. It will manage local changes via a stash if present.
> repo mainMerge a particular branch into the current branch, it will generate completions based on local branches
> repo merge <branch>Prune branches that have already been merged and deleted in the upstream origin.
These can be forced with --force
> repo prune-branchesRebase the current branch onto a particular branch
> repo rebase <branch>Initialisation within a repository with a custom hook. Define a hook as a
function called _repo_init_hook which if found will be executed.
> repo initSwitch to a local or remote branch
> repo switchCheckout a pull request currently on GitHub
> repo co-prfzfgh
_repo_log_cmd - set the command that is used when printing a git log. It is the command following git allowing you to use a git alias
- Support other hosted git platforms
- Find which tag includes a specific change to check which release a commit was captured in