Install GIT on Fedora 37

This article will go through how to install GIT on Fedora 37. Git is a distributed version control software that is open-source, free, and tracks changes to any set of files. It is frequently used to coordinate the efforts of programmers who are writing software’s source code together.

How to Install GIT on Fedora 37

  • Update your system packages.
sudo dnf upgrade --refresh
  • Git is installed by default on Fedora, run the installation command below to confirm you have Git.
sudo dnf install git -y

Configure Git on Fedora

  • Start by setting up your name.
git config --global user.name "YOUR NAME"
  • Next, set up your email.
git config --global user.email "YOUR EMAIL"
  • Then create a directory for your project and navigate to it using the command below.
mkdir demo-project
cd demo-project
  • Initialize git on the created directory using the following command.
git init

How to Check Git Configuration details

  • Use the command below to check GIT config user details.
git config --list
  • To check the details stored run the following command.
cat ~/.gitconfig

How to Store GIT Credentials

  • Enable the credential helper cache using the command below if you want to store authorization details.
git config --global credential.helper cache
  • Set expiry to a specific amount of time for security e.g. 10 hours
git config --global credential.helper "cache --timeout=36000"

How to Check GIT Status

  • Run the command below to check the Git repository status.
git status

How to Add GIT Repository

  • To add your Git repository to your project directory use the following command.
git remote add origin remote-repository-link

How to Commit GIT Changes

  • Run the command below with the changes message.
git commit -m "git changes message"

How to Push GIT Changes

  • To push changes from your local directory to the Git repository use the following command.
git push origin main

How to Pull GIT Changes

  • To pull changes from your Git repository to your local directory run the command below.
git pull origin main

How to update GIT on Fedora

  • Update GIT by running the command below.
sudo dnf update --refresh

How to Remove/Uninstall GIT on Fedora

  • Use the command below to uninstall Git on your system.
sudo dnf autoremove git
  • You have reached the end of our article, we have gone through how to install GIT on Fedora 37.

Read more on GIT Documentation

Other Tutorials

Install Git on FreeBSD 13

Install Gitea Code Hosting Service on Ubuntu Linux

Install Git on Oracle Linux

System administrator | Software Developer | DevOps

Leave a Comment