Skip to contents

FastGit works as a mirror of GitHub to make significant accelerations.

fgitR is a package to do git operation with FastGit automatically.

Installation

figtR has been released in CRAN. You can install the released version of fgitR from CRAN with:

# Install from CRAN
install.packages("fgitR")

# Compiling from Source
remotes::install_github("FastGitORG/fgitR")

# For upgrade installed `fgitR`
fgitR::fgit_install("FastGitORG/fgitR")

Install package from Source

library(fgitR)
#> 
#>     fgitR is created by Han Chen and maintained by FastGit UK Team who creates fastgit.org.
#> 

# fgitR can install package by Repository's Name
# fgitR_install("https://github.com/r-lib/diffviewer")

# fgitR can install package by Repository's URL
fgit_install("r-lib/diffviewer")
#> cloning into '/var/folders/wh/j50n_j8s28l0t3wlmkw6rsdc0000gn/T//RtmpFA0gnX/r-lib/diffviewer'...
#> Receiving objects:   1% (4/398),   31 kb
#> Receiving objects:  11% (44/398),   31 kb
#> Receiving objects:  21% (84/398),   31 kb
#> Receiving objects:  31% (124/398),   47 kb
#> Receiving objects:  41% (164/398),   47 kb
#> Receiving objects:  51% (203/398),   63 kb
#> Receiving objects:  61% (243/398),   79 kb
#> Receiving objects:  71% (283/398),   79 kb
#> Receiving objects:  81% (323/398),   79 kb
#> Receiving objects:  91% (363/398),  234 kb
#> Receiving objects: 100% (398/398),  234 kb, done.
#> Repo has been cloned to /var/folders/wh/j50n_j8s28l0t3wlmkw6rsdc0000gn/T//RtmpFA0gnX/r-lib/diffviewer
#> 
#> * checking for file ‘/private/var/folders/wh/j50n_j8s28l0t3wlmkw6rsdc0000gn/T/RtmpFA0gnX/r-lib/diffviewer/DESCRIPTION’ ... OK
#> * preparing ‘diffviewer’:
#> * checking DESCRIPTION meta-information ... OK
#> * checking for LF line-endings in source and make files and shell scripts
#> * checking for empty or unneeded directories
#> * building ‘diffviewer_0.1.1.9000.tar.gz’
#> 
#> Running /Library/Frameworks/R.framework/Resources/bin/R CMD INSTALL \
#>   /var/folders/wh/j50n_j8s28l0t3wlmkw6rsdc0000gn/T//RtmpFA0gnX/diffviewer_0.1.1.9000.tar.gz \
#>   --install-tests 
#> * installing to library ‘/Users/chenhan/R_lib_usr’
#> * installing *source* package ‘diffviewer’ ...
#> ** using staged installation
#> ** R
#> ** inst
#> ** byte-compile and prepare package for lazy loading
#> ** help
#> *** installing help indices
#> ** building package indices
#> ** testing if installed package can be loaded from temporary location
#> ** testing if installed package can be loaded from final location
#> ** testing if installed package keeps a record of temporary installation path
#> * DONE (diffviewer)

List all branch from Remote

branch_ls <-
  fgit_branch("FastGitORG/fgitR")

branch_ls
#> [1] "HEAD"                "refs/heads/gh-pages" "refs/heads/git2r"   
#> [4] "refs/heads/main"

Reinventing the wheel?

For the initially consideration, we believe it is necessary to add following functions:

  • Commit
  • Pull
  • Push

Due to git is not only clone to local, but also contribute back. But in the git clone or fgit clone procedure, the remote will be set as fastgit.org or other mirror domain. Hence, there is nothing special to make further operations.

Bug report

Feel free to let me know once it’s broken or just open an Issue.

Code of Conduct

Please note that the fgitR project is released with a Contributor Code of Conduct. By contributing to this project, you agree to abide by its terms.