How to Install Git on Fedora 36 – Quick Setup Guide
If you’ve just installed Fedora 36 and need a working copy of Git, this short guide shows exactly what to type and why each step matters. By the end you’ll have the official packages configured, ready for your next commit spree.
Use DNF – Fedora’s native package manager
Fedora ships with dnf, which pulls binaries from the official repositories and handles dependencies automatically. It’s the safest way to get Git without hunting down random .rpm files.
sudo dnf install git
Running this command does three things: it fetches the latest Git build that Fedora maintains, resolves any library requirements (like libcurl or zlib), and registers the binaries in /usr/bin. Skipping the sudo will just give you a permission error; skipping dnf for a manual download means you’ll have to track updates yourself.
Verify the installation
git --version
You should see something like git version 2.38.1. If the output shows an older number, it’s probably because you still have a stray copy from a previous manual install lingering in /usr/local/bin. In that case, rename or remove it before relying on the DNF-managed version.
Configure your identity (you’ll thank yourself later)
git config --global user.name "Your Name"
git config --global user.email "you@example.com"
Git stores these settings in ~/.gitconfig. Without them every commit will be anonymous, which can cause headaches when you push to shared repos. The --global flag applies the settings system‑wide; omit it if you need a different identity for a specific project.
Common hiccup: missing libcurl after a partial upgrade
I ran into this after updating Fedora from 35 to 36 mid‑month – Git launched, then immediately complained about “libcurl.so.4” not being found. The fix was simply:
sudo dnf reinstall git curl
Reinstalling both packages forces DNF to pull matching library versions and clears the error.
Optional: get the bleeding‑edge version
If you need features that haven’t made it into Fedora’s repo yet, enable the “updates-testing” stream:
sudo dnf --enablerepo=updates-testing install git
Be aware this pulls pre‑release builds; they’re useful for developers but can be a bit unstable on production machines. For most everyday users the standard repository version is more than sufficient.
That’s it – Git should now be ready to track your code, merge pull requests, and occasionally drive you mad when you forget to push.