Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nakabonne/giturl
A scheme converter for Git URLs
https://github.com/nakabonne/giturl
cli converter git url
Last synced: 15 days ago
JSON representation
A scheme converter for Git URLs
- Host: GitHub
- URL: https://github.com/nakabonne/giturl
- Owner: nakabonne
- License: mit
- Created: 2020-08-15T07:38:05.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2020-08-16T08:39:38.000Z (about 4 years ago)
- Last Synced: 2024-10-10T18:27:01.591Z (28 days ago)
- Topics: cli, converter, git, url
- Language: Go
- Homepage:
- Size: 60.5 KB
- Stars: 8
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# giturl
[![codecov](https://codecov.io/gh/nakabonne/giturl/branch/master/graph/badge.svg)](https://codecov.io/gh/nakabonne/giturl)
[![Go Doc](https://img.shields.io/badge/godoc-reference-blue.svg?style=flat-square)](https://godoc.org/github.com/nakabonne/giturl/pkg/converter)`giturl` lets you convert [Git URLs](https://git-scm.com/docs/git-clone#_git_urls) into the scheme you like.
## Installation
You can download a binary release [here](https://github.com/nakabonne/giturl/releases).
With Homebrew
```
brew install nakabonne/giturl/giturl
```With Go
```
go get github.com/nakabonne/giturl
```With Docker
```
docker run --rm nakabonne/giturl giturl
```## Examples
```bash
# Conversion of https to ssh
$ giturl ssh https://github.com/org/repo.git
ssh://github.com/org/repo.git# Conversion of SCP-like ssh syntax to https
$ giturl https --no-user [email protected]:org/repo.git
https://github.com/org/repo.git# Conversion of https to SCP-like ssh syntax
$ giturl ssh --scp-like --user=git https://github.com/org/repo.git
[email protected]:org/repo.git
```### Available commands
```
$ giturl -h
Converts Git URLs into the scheme you like.Usage:
giturl [command]Available Commands:
file Convert into file syntax
git Convert into git syntax
help Help about any command
http Convert into http syntax
https Convert into https syntax
ssh Convert into ssh syntax
version Print the current version
```## Supported schemes
SSH, Git, HTTP, and HTTPS protocols are available as Git URLs. The SSH protocol also supports an alternative SCP-like syntax:- `ssh://[user@]host.xz[:port]/path/to/repo.git/`
- `[user@]host.xz:path/to/repo.git/`
- `git://host.xz[:port]/path/to/repo.git/`
- `http[s]://host.xz[:port]/path/to/repo.git/`
- `file:///path/to/repo.git/` (for local repositories)See more: https://git-scm.com/docs/git-clone#_git_urls
## License
[MIT][license] © [Ryo Nakao][website][license]: /LICENSE
[website]: https://nakabonne.dev