Skip to content

Latest commit

 

History

History
47 lines (38 loc) · 1.72 KB

File metadata and controls

47 lines (38 loc) · 1.72 KB

Git-Even

A utility for synchronising repositories hosted on GitHub.com

Getting started

Clone the repository and install dependencies (requires bundler)

$ bundle install

Optional

Make git-even a Git command
Add the repository directory to your PATH

$ echo "export PATH=$PWD:\$PATH" >>~/.zshrc

Usage

Run git-even with --help to see all available options

The only mandatory argument is --key, or short -k to specify a GitHub Personal Access Token
You will need to have a token with a minimum of repo permission
This can be given directly -k ghp_xxxxxxxxxxxxxxxx, piped to stdin cat keyfile | git even -k - or when prompted

git even -k -
Please input your key:

Repositories are cloned to folders based on the owner login name by default into the current directory
Pass --path to override the base directory

Forks are not cloned by default, pass --forks to include them

By default if the login the token belongs to is not a member of an organisation then only the login's repositories are cloned
If the token's login does belong to at least one organisation then you will be prompted to choose which login to clone
You can automate this by passing either --login or --org an-org, but obviously not both!

Example Usage

$ cat my-ghp-token | git even --key - --login --path ~/repos
Authenticated as jimgolfgti (James Hopper)
Syncing login repositories

Cloning git-even to /Users/jimgolfgti/repos/jimgolfgti/git-even

Limitations

  • Currently does not synchronise Collaborator repositories belonging to the logged in user
  • All repositories are cloned/updated using SSH+GIT protocol (Who uses HTTPS?)