Almost everyone I know stores their git repositories in a single folder on their local machine.
hit is a multi-repo-agnostic version of git, which will use its working directory to figure out how many git
repositories are directly under it. Invoke it like you would git, and it will invoke the correct version of git
under the hood. This means it can do things like:
- Ensuring all your branches have the same name:
hit checkout -b <my-branch> - Listing files:
hit ls-files - Checking the status of a few repositories in a project:
hit backend status
curl -sSL https://get.haskellstack.org/ | sh
git clone https://github.com/dfithian/hit.git
cd hit
stack install # and add ~/.local/bin to your $PATH
hit ls-filesThat's it! Running hit in any directory will discover subdirectory git repositories.
In order to manage groups of projects together, create a ~/.config/hit/config file with the following schema:
fullstack:
home: ~/work/git
dirs:
- frontend-repo
- backend-repoNow you can use hit on the project named fullstack from anywhere on your machine:
hit fullstack statusAnything that works with git works with hit. That said, these are the list of tested commands.
ls-filesstatusdiffcommitcheckoutbranchpullpush