How to install and use Git in Termux

Learn How to use git in termux

Git is a popular version control system that allows developers to track changes and collaborate on their code. This article will show you how to install Git in Termux So that you can use git on Android with a Linux-like terminal.

how to install git in termux

Before we begin, ensure that you have Termux installed on your Android device. 

To install Git in Termux, follow these steps:

1. Open Termux and update the package repository by running the following command:

pkg update && apk upgrade -y

2.  Install the Git package by running the following command:

pkg install git

3. Once the installation is complete, verify that Git is installed correctly by running the following command:

git --version


Git version

You should see the version number of Git displayed in the output.

4. To configure Git with your name and email address, run the following commands:

git config --global "<Your Name>"

git config --global "<Your Email>"

This will ensure that your commits are correctly attributed to you.

5. You can now create a new Git repository by running the following commands:

mkdir <repository name>

cd <repository name>

git init 

This will create a new directory for your repository and initialize it as a Git repository. 

6. You can add files to the repository and commit changes using the usual Git commands.

That's it! You have successfully installed Git in Termux and can now use it to manage your code repositories.


Installing Git in Termux is not that hard. You can configure your remote repository according to your git platform

Hi, I'm Basudev
A Professional Blogger & Hacker Interested in Infosec, Web Development, Programming

Post a Comment

Comments will be reviewed before publishing