Skip to content

joshburnsxyz/git-shclone

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

git-shclone

Rust

Git plugin that provides a shortcut to clone repos from github using SSH urls. In the future I plan on refactoring the interface to make things not github specific.

BEFORE:

$ git clone [email protected]:joshburnsxyz/git-shclone

AFTER:

$ git shclone joshburnsxyz/git-shclone

Usage

git-shclone 0.1.1

USAGE:
    git-shclone [OPTIONS] [--] [ARGS]

ARGS:
    <REPO>    The github repo i.e username/repo

OPTIONS:
    -h, --help                Print help information
    -H, --host [<HOST>...]    One of: github, gitlab [default: github]
    -V, --version             Print version information

Installation

Linux package managers, Homebrew, etc. coming soon

Build From Source

Requires working Rust toolchain and Cargo installation

  1. Clone repo
git clone [email protected]:joshburnsxyz/git-shclone
cd git-shclone
  1. Build the release binary with cargo
cargo build --release
  1. Move the binary into your $PATH
mv target/release/git-shclone /usr/bin/git-shclone
  1. Test the --help message works.
git shclone --help

Todo

  • If supplied with a HTTP(S) URL, transform it into the SSH version
  • Refactor to make things not Github specific
  • Implement toolchain / scripts to build for all 3 major platforms to provide release binaries
  • Packaging for (major desktop) Linux distros, Homebrew, etc.
  • Use a Makefile to automate build steps and installation
  • Use .gitconfig files to assume default host choice, etc.