These days, it’s practically impossible to make a quality application without using version control. There are many popular alternatives, but the best is Git. So in this post, I’ll show you how to install Git on FreeBSD 12.
If you are starting to develop applications you may not know that Git is a free, open-source version control system and that it is perhaps the best. Many developers rely on it to control the versions of their applications. By versions, we mean those in development.
Using Git you can control and separate development in each of those development branches. So the changes of one do not affect the others.
In this way, it is good practice to develop applications using a version control system as support.
So, let us start.
Install Git on FreeBSD 12
Git is a popular open-source application that is available on many Linux and FreeBSD distributions. So before we work, let’s do some research into the official repositories.
:~$ sudo pkg search git git-2.24.1 Distributed source code management tool git-absorb-0.5.0_4 Git command for automating fixup/autosquash commits git-bzr-ng-git20140423_1 Bi-directional git to bzr bridge git-cinnabar-0.5.2_4 Git remote helper to interact with Mercurial repositories git-codereview-0.0.0.2016030201_1 Command-line tool for working with Gerrit git-cola-3.5 Sleek and powerful Git GUI git-crypt-0.6.0_1 Transparent file encryption in git git-cvs-0.1.0_1 Tool to incrementally import changesets from CVS into Git git-delta-0.0.14_1 Syntax-highlighting pager for git/diff git-extras-5.1.0 Sub-commands for repo summary, repl, changelog population, and more git-gui-2.24.1 Distributed source code management tool (GUI enabled) git-lfs-2.9.1 Git extension for versioning large files git-lite-2.24.1 Distributed source code management tool (lite package) git-merge-changelog-20140202 Git "merge" driver for GNU style ChangeLog files git-modes-emacs26-1.2.8_2,1 GNU Emacs modes for Git-related files git-modes-emacs26_canna-1.2.8_2,1 GNU Emacs modes for Git-related files git-modes-emacs26_nox-1.2.8_2,1 GNU Emacs modes for Git-related files git-modes-emacs27-1.2.8_2,1 GNU Emacs modes for Git-related files git-modes-emacs27_nox-1.2.8_2,1 GNU Emacs modes for Git-related files git-prompt.zsh-2.2.1 Fast, customizable, pure-shell, asynchronous Git prompt for Zsh git-remote-gcrypt-1.2 PGP-encrypt git remotes git-remote-hg-1.0.0 Transparent bidirectional bridge between Git and Mercurial for Git git-review-1.28.0 Allow to push code to review and interact with a Gerrit server git-review-py27-1.28.0 Allow to push code to review and interact with a Gerrit server git-secret-0.2.5 Bash tool to store your private data inside a git repository git-subrepo-0.4.0 Git command for managing subrepositories git-town-7.3.0_1 Git extension for generic, high-level git workflow support gitaly-1.77.0_1 Smart reverse proxy for GitLab gitblit-1.8.0_2 Open-source servlet for Git repositories gitea-1.10.3 Compact self-hosted Git service gitflow-1.12.3 Git extensions to provide high-level repository operations gitg-3.32.1 GTK-based git repository viewer gitg0-0.0.8_2 GTK-based git repository viewer (gtk2 version) github-backup-utils-2.8.3_1 GitHub Enterprise Backup Utilities
As you can notice, I have used the sudo command, if you don’t have it enabled, I invite you to read our post so you can enable it without problems.
However, in the image, we can see many packages related to git and of course, the git package. So, since we’re in the official repositories, just run the following command:
:~$ sudo pkg install git Updating FreeBSD repository catalogue... FreeBSD repository is up to date. All repositories are up to date. The following 29 package(s) will be affected (of 0 checked): New packages to be INSTALLED: git: 2.24.1 p5-CGI: 4.44 p5-HTML-Parser: 3.72 p5-HTML-Tagset: 3.20_1 perl5: 5.30.1 expat: 2.2.8 p5-IO-Socket-SSL: 2.066 p5-Mozilla-CA: 20180117 p5-Net-SSLeay: 1.85 p5-IO-Socket-INET6: 2.72_1 p5-Socket6: 0.29 p5-Authen-SASL: 2.16_1 p5-GSSAPI: 0.28_1 p5-Digest-HMAC: 1.03_1 python37: 3.7.6 p5-Error: 0.17028 curl: 7.67.0 ca_root_nss: 3.50 pcre: 8.43_2 p5-subversion: 1.13.0 utf8proc: 2.4.0 subversion: 1.13.0 serf: 1.3.9_4 apr: 220.127.116.11.6.1 gdbm: 1.18.1_1 db5: 5.3.28_7 liblz4: 1.9.2,1 p5-Term-ReadKey: 2.38_1 cvsps: 2.1_2 Number of packages to be installed: 29 The process will require 294 MiB more space. 56 MiB to be downloaded. Proceed with this action? [y/N]:
When the installation is complete, you can run the Git command to test the operation.
:~$ git --version git version 2.24.1
Now you can start working with Git.
Git is one of those applications that every developer must be able to manage to improve their workflow. So, you know how to install it on FreeBSD 12.
Please share this post and join our Telegram channel.