Prerequisites
Before cloning a repo, make sure you have:
- SSH access to your VPS
- Git installed
- Repository URL
Install Git
Connect to your VPS:
ssh hxroot@YOUR_SERVER_IP -p 22
apt install git -y
Clone HTTPS Repository
git clone https://github.com/username/repository.git
Clone Specific Branch
git clone -b branch-name https://github.com/username/repository.git
Clone into Specific Directory
git clone https://github.com/username/repository.git my-folder
Clone SSH Repository (Requires SSH Key Setup)
git clone git@github.com:username/repository.git
Update Existing Repository
cd repository
git pull
✅ Repository has been cloned to your VPS.