sudo apt update sudo apt install git -y Verify the installation:
git clone https://github.com/curl/curl.git This creates a folder named curl in your current directory. By default, git clone downloads the default branch (usually main or master ). To download a different branch:
git --version Cloning downloads the entire repository, including its full version history.