https://github.com/peterhellberg/clone
Tiny convenience tool for when I'm cloning Gists and GitHub repos.
https://github.com/peterhellberg/clone
cli git
Last synced: 8 months ago
JSON representation
Tiny convenience tool for when I'm cloning Gists and GitHub repos.
- Host: GitHub
- URL: https://github.com/peterhellberg/clone
- Owner: peterhellberg
- License: mit
- Created: 2024-10-02T17:01:27.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-03-04T15:19:09.000Z (11 months ago)
- Last Synced: 2025-03-04T16:29:33.620Z (11 months ago)
- Topics: cli, git
- Language: Go
- Homepage:
- Size: 5.86 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# clone 💾
> [!Note]
> This is just a tiny convenience tool for when I'm cloning Gists and GitHub repos.
## Installation
```console
go install github.com/peterhellberg/clone@latest
```
## Usage
```console
clone -h
Usage of clone:
-base string
The base directory to clone into (default "/home/peter/Code/GitHub")
-name string
The name to use for the project, if blank use GitHub name
```
> [!Tip]
> You can specify both the base directory where you keep
> your cloned repositories, as well as the name to use for
> the directory of the project being cloned.
```console
clone -base=/tmp/repos -name=trooper git@github.com:peterhellberg/clone.git
Cloning into '/tmp/repos/peterhellberg/trooper'...
remote: Enumerating objects: 15, done.
remote: Counting objects: 100% (15/15), done.
remote: Compressing objects: 100% (11/11), done.
remote: Total 15 (delta 3), reused 15 (delta 3), pack-reused 0 (from 0)
Receiving objects: 100% (15/15), done.
Resolving deltas: 100% (3/3), done.
```
> [!Important]
> You will get an error if there is already a directory
```console
clone -name aisnake git@gist.github.com:124fb025981b9b167f942c39b87e6624.git
fatal: destination path '/home/peter/Code/GitHub/Gists/aisnake' already exists and is not an empty directory.
exit status 128
```