类别 全部 - android - windows - sync

作者:林 光章 1 年以前

668

Logseq sync with Git and GitHub

Logseq sync with 
Git and GitHub

Logseq sync with Git and GitHub

參考文章:


iOS

Shortcuts
Working copy

Linux

Windows

Android

auto-syncing
create sync_mylogseq

#!/bin/bash

cd ~/storage/shared/Documents/<your repository name>

git add .

git commit -m "Android Sync $(date)"

git pull

git push

crontab -e

*/15 * * * * ~/sync_mylogseq.sh`

#每15分鐘執行次。


sv-enable crond
install

termux-services

cronie

git download
clone

git clone git@github.com:{your-username}/{your-reponame}.git 

sh
push.sh

#!/usr/bin/bash

source bin/source-ssh-agent

cd ~/storage/shared/Documents/<your repository name> 

git add -A

git commit -m "sync from android"

git push

pull.sh

#!/usr/bin/bash

cd ~/storage/shared/Documents/<your repository name>

git pull


ssh key
Git

apt update
apt upgradabe
apt upgrade
pkg install openssh
pkg install git      


Termux
fromGoogle Play
fromDriod

MacOS

.git/hooks
pre-commit

#!/bin/sh


output=$(git pull --no-rebase)


if [ "$output" = "Already up to date." ]; then

  # no ouput

  exit 0

else 

  echo "${output}"

fi


git add -A

post-commit

#!/bin/sh

git push origin main

logseq-plugin-git
ssh key

$ ssh-keygen -t ed25519 -C "your_email@example.com"

ED25519
git