GitHub in Termux
1. Install Git
pkg update && pkg upgrade
pkg install git
2. Configure Git (First Time Only)
git config --global [Link]
"YourName"
git config --global [Link]
"your@[Link]"
git config --list # to verify
3. Generate SSH Key
(Recommended)
ssh-keygen -t ed25519 -C
"your@[Link]"
# Press Enter for defaults
cat ~/.ssh/id_ed25519.pub # copy
this key
● Add the key to your GitHub
account → Settings → SSH and
GPG keys → New SSH key.
4. Clone a Repository
git clone [Link]
[Link]
# or (using SSH)
git clone git@[Link]:username/
[Link]
5. Basic Git Workflow
cd repository
git status # check
changes
git add filename # stage a file
git add . # stage all
changes
git commit -m "Your commit msg" #
commit
git push # push to
GitHub
git pull # pull latest
changes
6. Create a New Repo Locally & Push
to GitHub
mkdir myproject && cd myproject
git init
git remote add origin
git@[Link]:username/
[Link]
touch [Link]
git add [Link]
git commit -m "Initial commit"
git push -u origin main
7. Check Remote
git remote -v
8. Useful Extras
● git log → see commit history
● git diff → see changes before
staging
● git branch / git checkout -b
newbranch → branching
Tip: Keep your Termux updated
and periodically run pkg upgrade.
Tip: If you get Permission denied
(publickey) errors → recheck SSH key
added to GitHub.