" How to 2 Ways to Install Git / check version in cmd / Setting Up Git / uninstall Git on Ubuntu 24.04 "
. Git is a tool that helps you keep track of changes in your files and projects, making it easier to manage your work. It’s secure and widely used by many people to organize their code and projects.
__________________________________________________________________________________________________________________
Testing Environment: Ubuntu 24.04.1 LTS Hostname - ip Address -
__________________________________________________________________________________________________________________
apt update ; apt install build-essential net-tools curl software-properties-common
Method - 1
sudo apt update ; sudo apt install git -y
Setting Up Git -
git config --global user.name "Your Name"
git config --global user.email "youremail@domain.com"
git config --list
git config --global init.defaultBranch main
git config --global core.editor "nano"
git config --global --list
Uninstall Git -
sudo apt remove git -y ; sudo apt autoremove -y
__________________________________________________________________________________________________________________
Method - 2 Installing Git from Source -
sudo apt install libz-dev libssl-dev libcurl4-gnutls-dev libexpat1-dev gettext cmake gcc -y
mkdir tmp ; cd tmp
curl -o git.tar.gz https://mirrors.edge.kernel.org/pub/software/scm/git/git-2.51.0.tar.gz
tar -zxf git.tar.gz ; cd git-*
make prefix=/usr/local all
sudo make prefix=/usr/local install
exec bash
git --version
Uninstalling Git Installed from Source -
cd /path/to/git/source
sudo make uninstall
git --version
Setting Up Git -
git config --global user.name "Your Name"
git config --global user.email "youremail@domain.com"
git config --list
__________________________________________________________________________________________________________________
Saturday, September 27, 2025
2 Ways to Install Git And Setting Up Git on Ubuntu 24.04
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment