Install Git on FreeBSD 13

This article will go through how to install Git on FreeBSD 13. Git is free and open-source software for distributed version control, which tracks changes in any set of files. It is usually used to organize the efforts of programmers working on software source code together.

How to Install Git on FreeBSD 13

  • Install Git on FreeBSD using the command below.
sudo pkg install git

Sample output

All repositories are up to date.
The following 20 package(s) will be affected (of 0 checked):

New packages to be INSTALLED:
    git: 2.37.3
    p5-Authen-SASL: 2.16_1
    p5-CGI: 4.54
    p5-Clone: 0.45
    p5-Digest-HMAC: 1.04
    p5-Encode-Locale: 1.05
    p5-Error: 0.17029
    p5-GSSAPI: 0.28_2
    p5-HTML-Parser: 3.78
    p5-HTML-Tagset: 3.20_1
    p5-HTTP-Date: 6.05
    p5-HTTP-Message: 6.37
    p5-IO-HTML: 1.004
    p5-IO-Socket-INET6: 2.72_1
    p5-IO-Socket-SSL: 2.075
    p5-LWP-MediaTypes: 6.04
    p5-Mozilla-CA: 20211001
    p5-Net-SSLeay: 1.92
    p5-Socket6: 0.29
    p5-TimeDate: 2.33,1

Number of packages to be installed: 20

The process will require 34 MiB more space.
6 MiB to be downloaded.

Proceed with this action? [y/N]: y
  • To check the GIT version installed use the following command.
git -v

Configure GIT on FreeBSD 13

  • Add your GIT username.
git config --global user.name "YOUR NAME"
  • Next, add your email address.
git config --global user.email "YOUR EMAIL"
  • Create a sample directory using the command below.
mkdir demo
  • Navigate to the created directory.
cd demo
  • Then initialize GIT using the following command.
git init
  • Output more GIT info on the initialized directory.
ls -a .git
  • Display the configuration details in the terminal using the command below.
git config --list

Sample output

user.name=itnixpro
[email protected]
core.repositoryformatversion=0
core.filemode=true
core.bare=false
core.logallrefupdates=true
  • You have reached the end of our guide, we have gone through how to install Git on FreeBSD 13.

Read more on GIT Documentation

Other Tutorials

How to find path to a command in Linux

How to kill a process in Linux

How to move or copy a directory in Linux

System administrator | Software Developer | DevOps

Leave a Comment