Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/thecasualcoder/gg
A tool to manage multiple git repositories
https://github.com/thecasualcoder/gg
cli git git-governance hacktoberfest multi-git
Last synced: 3 months ago
JSON representation
A tool to manage multiple git repositories
- Host: GitHub
- URL: https://github.com/thecasualcoder/gg
- Owner: thecasualcoder
- License: mit
- Created: 2019-06-26T02:43:13.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2020-10-10T08:26:49.000Z (about 4 years ago)
- Last Synced: 2024-06-20T00:26:44.715Z (5 months ago)
- Topics: cli, git, git-governance, hacktoberfest, multi-git
- Language: Rust
- Homepage:
- Size: 10.6 MB
- Stars: 73
- Watchers: 5
- Forks: 2
- Open Issues: 13
-
Metadata Files:
- Readme: README.md
- Contributing: Contributing.md
- License: LICENSE
Awesome Lists containing this project
README
#### Git Governance
[![Build Status](https://travis-ci.org/thecasualcoder/gg.svg?branch=master)](https://travis-ci.org/thecasualcoder/gg)A tool to manage multiple git repositories.
This does not aim to replace git in any way but tries to reduce the work in managing multiple git repositories at once.
To know about the story behind this tool, take a look at this blog -> https://medium.com/@jpninanjohn/we-built-a-tool-in-rust-9c1bcb9b655e#### Installation
Using Brew:
```bash
brew tap thecasualcoder/stable
brew install gg
```Installing from source:
```bash
git clone https://github.com/thecasualcoder/gg.git
cd gg
cargo install --path .
```> Note: Recommaded rustc/cargo version: 1.36.0 and above or 1.37.0-nightly and above
#### Usage:
##### Help:
```bash
$ gg --help
```
![Help](/gifs/ggHelp.gif)##### Status:
Shows status of all git repos from current directory. Traverses inside directories also.
To traverse through hidden directories use the `-i` flag. By default hidden directories will not be traversed.```bash
$ gg status
```
![Status](/gifs/ggStatus.gif)##### Create:
Creates a remote repository and clones it to the local path specified. Remote repository is created based on the GITHUB_TOKEN provided.
GITHUB_TOKEN can be passed as an env variable or can be given as an argument through the `-t` flag
```bash
$ gg create -r -l
```
![Create](/gifs/ggCreate.gif)##### Fetch:
Fetches from all git repositories starting from current directory. Traverses inside directories also.
Currently Fetch only uses the private key `id_rsa` to authenticate and will fail to fetch if it is not enough. Failure to fetch one repo will not fail others
To traverse through hidden directories use the `-i` flag. By default hidden directories will not be traversed.
```bash
$ gg fetch
```
![Fetch](/gifs/ggFetch.gif)##### Clone:
Clones repositories based on the flags passed and the configuration given in the `.ggConf.yaml` file.
```bash
$ gg clone -r -r -l
```
![Clone](/gifs/ggClone.gif)##### Config file:
The config file can be specified via the `-c` flag. By default it tries to find `.ggConf.yaml`.
Example config file:```yaml
skipDirectories:
- ignore
cloneRepos:
- remoteURL: https://github.com/golang/net.git
localPath: here/net
- remoteURL: https://github.com/golang/net.git
localPath: there/net
ssh:
privateKey: '/home/ninan/.ssh/gg'
username: 'git'
ssh_agent: false
```See `.ggConf.example.yaml` for more details
##### Contributing:
[Please refer the github projects board](https://github.com/thecasualcoder/gg/projects/1)
If you want some feature, please create an issue and if possible feel free to raise PR too.