https://github.com/redetection/github-clone
A tiny script to speed up clone and cd
https://github.com/redetection/github-clone
Last synced: about 2 months ago
JSON representation
A tiny script to speed up clone and cd
- Host: GitHub
- URL: https://github.com/redetection/github-clone
- Owner: ReDetection
- Created: 2019-07-07T11:11:33.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2019-07-07T11:22:33.000Z (almost 7 years ago)
- Last Synced: 2025-01-25T10:43:13.792Z (over 1 year ago)
- Language: Shell
- Size: 1000 Bytes
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# github-clone
I store github projects under `~/src/github` folder, and instead of issuing a `cd` command, `ls` to check if I have one and finally `git clone` I can just run this line to immediately clone and fall into project folder, no matter where I been in the filesystem.
```
. github clone https://github.com/ReDetection/github-clone.git
```
Note the dot and a space before `github`, they matter! This expands to `source` to be able to change directory from a basj script.
### Features
* automatic cancellation of `.git` suffix for the projects
* on existing cloned projects, it will just `cd` into and do a `git fetch`
* `-t {type}` (defaults to `github`). Clone project to other folder
E.g. `-t work` will clone project to `~/src/work/PROJECTNAME`
* `--debug` will just show where the files go and does nothing.