Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/pietvanzoen/git-get
Like `go get` but `git`.
https://github.com/pietvanzoen/git-get
command-line git hacktoberfest
Last synced: 3 months ago
JSON representation
Like `go get` but `git`.
- Host: GitHub
- URL: https://github.com/pietvanzoen/git-get
- Owner: pietvanzoen
- License: mit
- Created: 2018-12-01T08:12:55.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2021-01-14T08:41:27.000Z (almost 4 years ago)
- Last Synced: 2024-06-11T13:45:33.186Z (5 months ago)
- Topics: command-line, git, hacktoberfest
- Language: Shell
- Homepage:
- Size: 42 KB
- Stars: 42
- Watchers: 2
- Forks: 6
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- jimsghstars - pietvanzoen/git-get - Like `go get` but `git`. (Shell)
README
# Git get [![Build Status](https://travis-ci.com/pietvanzoen/git-get.svg?branch=master)](https://travis-ci.com/pietvanzoen/git-get)
Like `go get`, `git-get` organizes repos in directories matching the path of the clone url.
## Usage
`git get [email protected]:pietvanzoen/dotfiles.git` will clone the project into `$GIT_PATH/github.com/pietvanzoen/dotfiles`.
## Configuration
The following environment variables configure `git get` behavior:
### `GIT_PATH` - required
Path to directory to clone into.
### `GIT_GET_DEFAULT_PREFIX` - optional
Configure a default prefix for cloning.
E.g: This will clone the repo `https://github.com/pietvanzoen/git-get.git`:
```shell
export GIT_GET_DEFAULT_PREFIX=https://github.com/
git get pietvanzoen/git-get
```## Installation
```bash
git clone https://github.com/pietvanzoen/git-get.git
cd git-get
INSTALL_DIR= ./install
```If `$INSTALL_DIR` is not specified it will default to `$HOME/bin`.
That's it! `git get` automatically call `git-get`.
## Tips
* Use `git get` alongside [autojump](https://github.com/wting/autojump) to effortlessly navigate your folder structure.
* Clone and change directory in the same command. Add this to your shell environment files: `gg() { dir="$(git get $1)"; [[ -n "$dir" ]] && cd $dir }`## See also
* [ghq](https://github.com/motemen/ghq) - A more feature full approach to managing repos in a `go get` way. Written in go.
* [h](https://github.com/zimbatm/h) - Combines the ideas of `git get` with `autojump` into one package. Written in python.