In This Post I Am Going To Show You How To Install Git In Termux. Installing Git Is One The First And Important Things To Do After The Installation Of Termux In Your Android Device. In This Tutorial We Will Start From The Basic Definition And Installation Of Git To The Usage Of Git In Termux. Make Sure To Read This Tutorial Completely To Understand More About Git?
How To Install Git In Termux?
Installing Git In Termux Is An Easy Job To Do But Setting Up GitHub Is A Little Critical Process. We Will Install Git In Termux First Followed By The Installation Of Github In Termux. If You Are Reading This Tutorial That Means You Have A Little Bit Of Knowledge About Git And Termux. Follow The Below Steps One By One To Install Git In Termux:
Pre-requisites
- An Updated Termux Apk
- An Active Internet Connection.
- Free Storage Of More Than 300 MB
- Android Version Above 8.
Step 1: First Of All Install The Termux App From The Play Store Of F-Droid And Open It.
Step 2: Update The Currently Installed Packages In Termux Using pkg update && pkg upgrade -y
Command.
pkg update && pkg upgrade -y
Step 3: Install Git In Termux Using pkg install git -y
As Git Is Already Available In The Termux Packages Makes It Much Easier To Install.
pkg install git -y

Step 4: After We Have Install Git In Termux. We Have To Install The Gh Element Also In Termux So That We Can Login Into The GitHub And Make Changes. Install Gh Using pkg install gh
Command.
pkg install gh

Once The Installation Has Been Finished We Have To Setup Git In Termux. Make Sure All These Steps Are Properly Done Without Any Before Before Moving On Setting Up The Git In Termux.
How To Setup Git In Termux?
After We Have Install Git In Termux We Need To Setup Git In Termux To Avail All The Services That Include Editing GitHub Files In Termux, Create Folder And Other Things. We Need A Github Account For This Process Which Must Be Logged In The Device Currently.
Step 1: First Of All You Need To Configure The Email And Username Using git config --global user.name "Your Name"
And git config --global user.email "your.email@example.com"
Command In Termux.

Step2: Then We Need To Login Into The GitHub Account In Termux. We Need Type gh auth login
Command And Enter The Login Details.
gh auth login

Step 3: After The Login Details, Use The Options That I Have Used In This Image To Complete The Login. Copy The Code And Paste It In Link Provided Above In Image In Termux And Authorize It.

After The Login Has Been Done In GitHub You Can Enjoy All The Services Of The Git In Termux. Make SUre It Shows That Logged In As Username. Now We Will See The Uses Of Git In Termux.
Also Read: How To Install Apktool In Termux | Latest Method 2025
How To Use Git In Termux?
After All These Things We Will Use The Git In Termux For Different Processes, We Will Discuss Most Of The Uses Of Termux In This Tutorial. Below Are The Uses Of Git In Termux.
Intitate A New Repository In GitHub: You Can Use The git init
Command To Inititate A New Git Repo In Termux.
git init

Adding New File In GitHub: You Can Also Add New Files In GitHub Repo Using git add filename
Command In Termux.
git add filename
Commit Change: To Commit Change In Termux You Can Commit git commit -m "Your commit message"
Command. You Can Replace "Your Commit Message"
To Your Own Message.
git commit -m "Your Commit Message"
Get Status: To Check The Status Of The Git Files In Termux We Can get status
Command.
get status
Clone Repository From GitHub: You Can Also Clone The Repository From GitHub Using git clone https://github.com/username/repository.git Command In Termux. (Replace The Link With The Repo You Want To Clone).
git clone https://github.com/username/repository.git

These Are Some Functions That Can Be Used In Termux Through Git. There Are Many Functions And Commands Also Which You Can Check Using git --help
Command In Termux.
How To Remove Git From Termux?
If You Have Installed Git In Termux And Now Want To Remove The Github From Termux, You Need To Type pkg uninstall git
And Then Approve The Uninstallation By Typing Y In Termux.
pkg uninstall git

Make Sure This Command Will Remove Git Completely From Termux And Must Be Installed Newly To Use In Termux.
Conclusion:
Git Is One Of The Most Essential Packages Of The Termux. One Should Install Git In Termux And Authenticate Your Account With GitHub In Termux. As We Know Most Of The Tools Are Hosted One GitHub So We Need To Install Git In Termux Inorder To Clone And Initiate And New Repo In Termux. Git Enables Us To Code Directly In The GitHub Account. I Hope You Have Understood This Post, If You Got Any Queries Tell Me In The Comment Section. Thanks For Reading.
Frequently Asked Questions:
What Is Git?
It Is A An Open Source Version Control That Enables The Users To Add And Modify And Host The Code In Web.
How To Install Git InTermux Using A Single Comamnd?
You Need To Type pkg install git -y Command To Install Git In Termux Using A Single Command In Termux.
Can We Install Git In Kali Linux?
Yes, Git Can Also Be Installed In Kali Linux Using apt install git -y Command.
4 thoughts on “How To Install Git In Termux | Latest Method 2025”