0% found this document useful (0 votes)
88 views2 pages

GitHub in Termux

This document provides a step-by-step guide on how to use GitHub within the Termux environment, starting from the installation of Git to configuring user details and generating an SSH key. It outlines the basic Git workflow for cloning repositories, making commits, and pushing changes to GitHub, as well as creating a new repository locally. Additional tips and commands for managing remote repositories and troubleshooting are also included.

Uploaded by

qxgzftj99n
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
88 views2 pages

GitHub in Termux

This document provides a step-by-step guide on how to use GitHub within the Termux environment, starting from the installation of Git to configuring user details and generating an SSH key. It outlines the basic Git workflow for cloning repositories, making commits, and pushing changes to GitHub, as well as creating a new repository locally. Additional tips and commands for managing remote repositories and troubleshooting are also included.

Uploaded by

qxgzftj99n
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

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.

You might also like