2024-04-03 Git in Termux


One of the advantage of hosting a site in a git repo ia that you have the option to create and edit your static website data in an android phone (i don't know about the situation in other mobile OSs). Also I thought about creating this page from my phone.


Steps

  1. To save termux file in android home folder
    cd /storage/emulated/0

  2. For git clone
    git clone https://gitlab.com/example.gitlab.io

  3. To Git pull
    cd /storage/emulated/0 (Go to Home folder)
    cd example.gitlab.io (Go to your git file)
    git pull (pull/update] all files from the the git repo)

  4. To Git commit and push
    git add index.html posts.html (file names that have been modified, file names are separarted by spaces)
    git commit -m message (commit with a message)
    git push origin main (commit to main branch, for github it is called "master" instead of main)


Go to Top