The Wayback Machine - https://web.archive.org/web/20201216224008/https://github.com/rafi/gits
Skip to content
master
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
cmd
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.md

Gits Build Status

A Fast CLI Git manager for multiple repositories

gits animated overview

Install

Requirements: Git

go get github.com/rafi/gits

Or on macOS:

brew install rafi/tap/gits --HEAD

Usage

Usage: gits [command] <project>

Available Commands:

  • checkout - Traverse repositories and optionally checkout branch
  • clone - Clones all repositories for specified project(s)
  • fetch - Fetches and prunes from all remotes
  • help - Help about any command
  • status - Shows Git repositories short status
  • version - Shows gits current version

Config

Configuration file must be present at ~/.gits.yaml

Definitions

Root

Name Description
projects Collection of projects, key/value.

Example:

projects:
  acme: {}
  myapp: {}
  myotherapp: {}
  secretproject: {}

Project

Name Description
repos List of projects
path Optional. Base path for all project repositories.
desc Optional. Description to display when running commands.

Example:

projects:
  acme:
    repos: []
  myapp:
    path: ~/code/myapp
    repos: []

Project Repositories

Name Description
dir Directory where repository should/is cloned. Can be absolute or relative to project base path if specified.
src Optional. Remote address to clone from.
projects:
  acme:
    repos:
      - dir: ~/code/acme/api
      - dir: ~/code/acme/web
  myapp:
    path: ~/code/myapp
    repos:
      - dir: api
        src: https://github.com/myapp/api.git
      - dir: ios
        src: https://github.com/myapp/ios.git
      - dir: android
        src: https://github.com/myapp/android.git

Example Config

---

projects:
  acme:
    path: ~/code/python/acme
    desc: Acme is a really cool app.
    repos:
    - dir: admin
    - dir: ant-design-pro
    - dir: api
    - dir: infra
    - dir: ios
    - dir: react-native
    - dir: web
    - dir: webapp

  rafi:
    desc: My dotfiles
    repos:
    - dir: ~/.config
      src: git@github.com:rafi/.config.git
    - dir: ~/.config/nvim
      src: git@github.com:rafi/vim-config.git

  vim:
    path: ~/code/vim
    desc: Vim plugins
    repos:
    - dir: awesome-vim-colorschemes
    - dir: badge
    - dir: denite-mpc
    - dir: denite-session
    - dir: denite-task
    - dir: denite-z
    - dir: unite-issue
    - dir: vim-sidemenu
You can’t perform that action at this time.