https://github.com/dfang/xgit
git wrapper
https://github.com/dfang/xgit
Last synced: 3 months ago
JSON representation
git wrapper
- Host: GitHub
- URL: https://github.com/dfang/xgit
- Owner: dfang
- Created: 2023-05-08T03:33:41.000Z (about 3 years ago)
- Default Branch: master
- Last Pushed: 2023-09-04T04:35:06.000Z (almost 3 years ago)
- Last Synced: 2026-01-12T18:38:57.933Z (5 months ago)
- Language: Go
- Homepage:
- Size: 36.1 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# README
让`git clone`更方便。
在梯子临时不好使了,或者还没来得及装梯子的环境中,想临时克隆下github仓库可以试试这个
或者经常需要克隆仓库,这个也很方便
运行 `xgit clone /` 就可以了, 对比正常的`git clone https://github.com//`, `git`换成`xgit`, `https://github.com`都可以不用输了
如果需要指定克隆到哪里. `xgit clone / /tmp/`
## install
三种方式任选一种
```
curl -sf http://goblin.run/github.com/dfang/xgit | sh
curl -sf https://raw.githubusercontent.com/dfang/xgit/master/scripts/install.sh | sh
go install github.com/dfang/xgit@latest
```
## run
三种格式都支持
```
xgit clone golang/go
xgit clone github.com/golang/go
xgit clone https://github.com/golang/go
```
by default, `--depth=1` is added to `xgit clone`, you have to run `git fetch --unshallow` to get all old commits if you want after clone is done.
you can `--no-depth=` to skip `--depth=1`.
eg. `xgit clone https://github.com/golang/go` or `xgit clone golang/go`
if you want to change url for remote after:
```
git remote -v
git remote set-url origin
git remote -v
```