Home

Awesome

<img width="150" height="150" align="left" style="float: left; margin: 0 10px 0 0;" alt="fastgit" src="https://cdn.jsdelivr.net/gh/FastGitORG/logo@ad87e38c7101537010b3dc6f7d4d52bd1f915002/v2.1.png">

fgit-go

CircleCI LGBT-CN

Command line to do git operation with FastGit.

What works

Preparation

Before use fgit-go, install git by yourself. Add git to env PATH is also required.

Download source code of fgit-go, build and run.

Extra Syntax

1. debug

SYNTAX:

fgit debug [URL<string>] [help]

FUNCTION:

This command line is for debug. Will provide remote addr, local addr, and connection info.

EXAMPLE:

>fastgit debug
FastGit Debug Tool
==================
Remote Address: https://hub.fastgit.org
IP Address: [x.x.x.x]
Local Address: [x.x.x.x]
Test connection...Success

2. get

SYNTAX:

fgit get [URL<string>] [Path<string>] [--help]

ALIAS:

fgit dl
fgit download

FUNCTION:

This command line is for downloading. Will auto convert github download link to fastgit.

EXAMPLE:

>fgit get https://github.com/fastgitorg/fgit-go/archive/master.zip
File with the same name exists. New file will cover the old file.
Do you want to continue? [Y/n]y
Redirect url -> https://download.fastgit.org/fastgitorg/fgit-go/archive/master.zip
Downloading...
Finished.

Difference between fgit

fgit by @xkeyc only provides clone operation support, but fgit-go provides push and etc.

And, fgit-go is cross-platform.

How does fgit-go work

To clone, fgit-go just replaces url to FastGit url.

To push, fgit-go modifies .git config temporarily. Like

[core]
        repositoryformatversion = 0
        filemode = false
        bare = false
        logallrefupdates = true
        symlinks = false
        ignorecase = true
[remote "origin"]
        url = https://github.com/A/B
        fetch = +refs/heads/*:refs/remotes/origin/*
[branch "master"]
        remote = origin
        merge = refs/heads/master

To

[core]
        repositoryformatversion = 0
        filemode = false
        bare = false
        logallrefupdates = true
        symlinks = false
        ignorecase = true
[remote "origin"]
        url = https://hub.fastgit.org/A/B
        fetch = +refs/heads/*:refs/remotes/origin/*
[branch "master"]
        remote = origin
        merge = refs/heads/master

Open-Source License - GNU General Public License v3.0

                    GNU GENERAL PUBLIC LICENSE
                       Version 3, 29 June 2007

 Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
 Everyone is permitted to copy and distribute verbatim copies
 of this license document, but changing it is not allowed.

Proudly build with ❤️ & golang