Terminal on Android
Setting up git on Android¶
Mobile Sync for Obsidian | Some Thoughts
Termux Terminal on Android¶
- Download Termux (terminal) on F Droid
- not on Google Play
- Download the Termux:Widget | F-Droid
pkg update
- if it doesn't work:
termux-change-repo
- select the first option
- if it doesn't work:
pkg install git
pkg install openssh
ssh-keygen
cat ~/.ssh/id_rsa.pub
- add SSH key to GitHub
termux-setup-storage
- give termux access to the file system via
~/storage
- no SD card access without root 😥
- give termux access to the file system via
cd ~/storage/downloads
- Install vim
pkg install vim
- Setup git
git config --global pull.rebase false
git config --global user.name "Fullchee Zhang"
git config --global user.email "fullchee@gmail.com"
git clone git@github.com:Fullchee/notes.git
git clone git@github.com:Fullchee/private-notes.git
chmod 700 -R /data/data/com.termux/files/home/.shortcuts
~/.shortcuts/sync_notes.sh
Let git know to trust that folder
#/bin/bash
sync() {
git add -A && git commit -m "Android" && git pull && git push;
}
cd ~/storage/downloads/notes
echo "Syncing notes"
sync
cd ~/storage/downloads/private-notes
echo "Syncing private notes"
sync
Last update:
2023-04-24