Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/dfithian/hit

A tool for managing multiple git repositories
https://github.com/dfithian/hit

git haskell

Last synced: 3 months ago
JSON representation

A tool for managing multiple git repositories

Awesome Lists containing this project

README

        

# Hit

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 `
* Listing files: `hit ls-files`
* Checking the status of a few repositories in a project: `hit backend status`

## Quick start

```bash
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-files
```

That's it! Running `hit` in any directory will discover subdirectory git repositories.

## Projects

In order to manage groups of projects together, create a `~/.config/hit/config` file with the following schema:

```yaml
fullstack:
home: ~/work/git
dirs:
- frontend-repo
- backend-repo
```

Now you can use `hit` on the project named `fullstack` from anywhere on your machine:

```bash
hit fullstack status
```

## Supported commands

Anything that works with `git` works with `hit`. That said, these are the list of _tested_ commands.

* `ls-files`
* `status`
* `diff`
* `commit`
* `checkout`
* `branch`
* `pull`
* `push`