Git is a distributed revision management system developed in 2005 by Linus Torvalds for improvement of the Linux Kernel. Git permits a consumer to trace modifications in supply code throughout software program improvement. There are thousands and thousands of Git repositories hosted in GitHub, GitLab and different model management repository internet hosting companies. On this information, we’ll see easy methods to show a Git repository abstract in Terminal utilizing Onefetch.

Onefetch is a command line software to get a Git repository’s info proper from the terminal. It shows numerous particulars of a given Git repository as listed under:

  • Undertaking identify,
  • HEAD,
  • Undertaking’s model,
  • The yr of the challenge creation,
  • Identify of the programming languages which can be used to create this challenge,
  • Identify of the authors and their contribution stage in share,
  • When the repository is final modified,
  • The URL to the repository,
  • Whole variety of commits,
  • Whole strains of code,
  • The dimensions of the repository,
  • Undertaking license.

Onefetch shows all the aforementioned particulars together with the dominant programming language’s ASCII emblem. You may, in fact, change the ASCII emblem with your individual or textual content enter or nothing in any respect. Onefetch is absolutely customizable. You may configure it utilizing command line flags to show precisely what you need and the way in which you need it to. As an example, you may determine which language’s ASCII emblem to print, disable a particular element from the output, change the ASCII artwork shade, and alter the textual content shade and many others.

Onefetch helps greater than 50 programming languages on the time of penning this information. Should you assume a particular language is lacking, simply open a problem in GitHub and the help is likely to be added.

It’s an open supply challenge written in Rust programming language. The supply code of Onefetch is freely accessible in GitHub below MIT license.

Set up Onefetch in Linux

Onefetch could be put in in a number of methods.

Obtain the Onefetch binary from the releases web page:

$ wget https://github.com/o2sh/onefetch/releases/obtain/v2.5.0/onefetch-linux.tar.gz

Extract the downloaded archive and transfer it to your $PATH like under:

$ sudo mv onefetch-linux/onefetch /usr/native/bin/

Onefetch can also be accessible in AUR, so you may set up Onefetch on Arch Linux and its variants utilizing any AUR helper instruments, for instance Yay, like under:

$ yay -S onefetch

To put in Onefetch on NixOS, run:

$ nix-env -i onefetch

On openSUSE Leap and Tumbleweed:

$ sudo zypper set up onefetch

Show Git Repository Abstract In Terminal Utilizing Onefetch

For the aim of this information I’m going to fetch the main points of Onefetch Git repository itself. I’ve cloned the Onefetch repository in my Desktop.

To show Git repository abstract in Terminal, both immediately point out path of the repository like under;

$ onefetch Desktop/onefetch/

Or go to the Git repository and run onefetch:

$ onefetch

Pattern output:

R RR RR ostechnix ~ git model 2.25.1
RRRRRRRRRR R ——————————
R RRRRRRRRRRRRRRR Undertaking: onefetch (19 branches, 18 tags)
RRRRRRRRRRRRRRRRR R HEAD: c133f7a (grasp, origin/grasp)
R RR RRRRRRRRRRRRRRRRRRRRRR RR Model: v2.5.0
rR RRR RRRRRRRRRRRRRRRRRRRRR RRR R Created: 2 years, 2 months in the past
RRR RR RRRRRRRRRRRRRRRRRRRRRRRRR RRRRR Languages: Rust (95.9 %) Python (3.1 %)
RRRRR RRRRRRRRRRRRRRRRRRRRRRRR RRRR Nix (1.1 %)
RRR RRRRRRRRRRRRRRRRRRRRRRRRRRRR RR Authors: 57% o2sh 488
R RRRRRRRRRR= RR = RRRRRRRRRRR 5% dependabot[bot] 50
RRRRRRRRRRRr= RR = RRRRRRRRRR 5% Spenser Black 49
RRRRRRRRRRR RR RRRRRRRRRR Final change: 11 hours in the past
RR==RRRRRRRRRRRRRRRRRRRRRR===RR Repo: https://github.com/o2sh/onefetch.git
RR = .==RRRRRRR RRRRRR== = Rr Commits: 855
RR = =========== = RR Traces of code: 2360
RR R Measurement: 12.27 MiB (97 recordsdata)
R R License: MIT
R

Display Git Repository Summary In Terminal Using OnefetchShow Git Repository Abstract In Terminal Utilizing Onefetch

As you may see within the above output, Oefetch shows the code distribution, high contributors (by variety of commits), repository measurement,, creation date, model, HEAD, final change, whole no strains of code, and license and many others.

As acknowledged already, Onefetch shows dominant language’s ASCII artwork within the output. For the reason that main a part of Onefetch is developed in Rust, it reveals the Rust language’s ASCII artwork. You can even use another language’s ASCII utilizing -a, –ascii-language flag. The next command shows the Onefetch Git repository abstract alongside Python ASCII emblem:

$ onefetch -a python

Please be aware that I’m operating Onefetch from within the git repository. In case your repository is saved elsewhere, you will need to specify its full path after which the flags.

Pattern output:

::::::::::::: ostechnix ~ git model 2.25.1
:::::::::::::::::: ——————————
::: :::::::::::::: Undertaking: onefetch (19 branches, 18 tags)
:::::::::::::::::::: HEAD: c133f7a (grasp, origin/grasp)
:::::::::: Model: v2.5.0
:::::::::::::::::::::::::: ______ Created: 2 years, 2 months in the past
:::::::::::::::::::::::::::: ________ Languages: Rust (95.9 %) Python (3.1 %)
::::::::::::::::::::::::::::: _________ Nix (1.1 %)
::::::::::::::::::::::::::::: _________ Authors: 57% o2sh 488
:::::::::::::::::::::::::: __________ 5% dependabot[bot] 50
::::::::::: ___________________________ 5% Spenser Black 49
::::::::: _____________________________ Final change: 12 hours in the past
:::::::: _____________________________ Repo: https://github.com/o2sh/onefetch.git
:::::::: _____________________________ Commits: 855
:::::: __________________________ Traces of code: 2360
____________________ Measurement: 12.27 MiB (97 recordsdata)
____________________ License: MIT
______________ ___
__________________
_____________

Display Git Repository Summary In Terminal Using OnefetchGet Git repository abstract utilizing onefetch with totally different language ASCII artwork

To record all supported languages, use -l, –languages flag.

$ onefetch -l

You can even use customized picture, for instance your individual emblem utilizing -i, –image flag.

$ onefetch -i ~/ostechnix.png

Display Git Repository Summary In Terminal Using OnefetchShow git repository abstract in terminal utilizing onefetch with customized ASCII artwork

By default, Onefetch will show three authors solely. A number of authors could contribute to a Git challenge. To show variety of authors to be proven, use -A, –authors-number flag.

$ onefetch -A 10

The above command will present 10 authors.

There are numerous different flags to do numerous customizations comparable to change ascii colours, textual content colours, shade decision, ignore merge commits, exclude recordsdata, folders, and extra. Refer the assistance part to study all accessible choices:

$ onefetch -h

Onefetch assist part:

onefetch 2.5.0
Git repository abstract in your terminal

USAGE:
onefetch [OPTIONS] [–] [input]

OPTIONS:
-a, –ascii-language Which LANGUAGE’s ascii artwork to print.
-d, –disable-fields … Permits you to disable FIELD(s) from showing within the output.
-c, –ascii-colors … Colours (X X X…) to print the ascii artwork.
–no-bold Turns off daring formatting.
-l, –languages Prints out supported languages
-i, –image Path to the IMAGE file
–image-backend Which picture BACKEND to make use of.
–no-merge-commits Ignores merge commits
–no-color-blocks Hides the colour blocks
-A, –authors-number NUM of authors to be proven. [default: 3]
-e, –exclude … Ignore all recordsdata & directories matching EXCLUDE.
-h, –help Prints assist info
-V, –version Prints model info

ARGS:
Run as if onefetch was began in as an alternative of the present working listing.

Useful resource:

Associated learn:

"git branch -t",git checkout -t,git checkout -t flag,git clone options,git remote,git push -u