igazine.com

this is mental

User Tools

Site Tools


technical:notes_cherrytree_git_sync

FIXME

cd ~/Documents/CherryTree_Docs/

git init

git status

On branch main No commits yet Untracked files:

(use "git add <file>..." to include in what will be committed)
Erics_Journal.ctb
Erics_Journal.ctb~
Erics_Journal.ctb~~
Erics_Journal.ctb~~~
Kaiser_IT_Personal.ctb
Kaiser_IT_Personal.ctb~
Kaiser_IT_Personal.ctb~~
Kaiser_IT_Personal.ctb~~~
Kaiser_IT_Planning.ctb
Kaiser_IT_Planning.ctb~
Kaiser_IT_Planning.ctb~~
Kaiser_IT_Planning.ctb~~~

nothing added to commit but untracked files present (use “git add” to track) eric@kalin-emcwilliams:~/Documents/CherryTree_Docs$ git add -A eric@kalin-emcwilliams:~/Documents/CherryTree_Docs$ git status On branch main

No commits yet

Changes to be committed:

(use "git rm --cached <file>..." to unstage)
new file:   Erics_Journal.ctb
new file:   Erics_Journal.ctb~
new file:   Erics_Journal.ctb~~
new file:   Erics_Journal.ctb~~~
new file:   Kaiser_IT_Personal.ctb
new file:   Kaiser_IT_Personal.ctb~
new file:   Kaiser_IT_Personal.ctb~~
new file:   Kaiser_IT_Personal.ctb~~~
new file:   Kaiser_IT_Planning.ctb
new file:   Kaiser_IT_Planning.ctb~
new file:   Kaiser_IT_Planning.ctb~~
new file:   Kaiser_IT_Planning.ctb~~~

eric@kalin-emcwilliams:~/Documents/CherryTree_Docs$ git commit -m “Initialize repository”

[main (root-commit) 1c6be2f] Initialize repository 12 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 Erics_Journal.ctb create mode 100644 Erics_Journal.ctb~ create mode 100644 Erics_Journal.ctb~~ create mode 100644 Erics_Journal.ctb~~~ create mode 100644 Kaiser_IT_Personal.ctb create mode 100644 Kaiser_IT_Personal.ctb~ create mode 100644 Kaiser_IT_Personal.ctb~~ create mode 100644 Kaiser_IT_Personal.ctb~~~ create mode 100644 Kaiser_IT_Planning.ctb create mode 100644 Kaiser_IT_Planning.ctb~ create mode 100644 Kaiser_IT_Planning.ctb~~ create mode 100644 Kaiser_IT_Planning.ctb~~~ eric@kalin-emcwilliams:~/Documents/CherryTree_Docs$

SSH to your remote host and setup the bare repo: (this is assuming you have the right accounts and sshkeys setup) ssh eric@gitshed.igazine.com

mkdir -p git/cherrytree.git git init –bare git/cherrytree.git

Now return back to the host with the ChreeyTree .ctb files and sync these files to the remote repo.

eric@kalin-emcwilliams:~/Documents/CherryTree_Docs$ git remote add origin eric@gitshed.igazine.com:/home/eric/projects/git/cherrytree.git eric@kalin-emcwilliams:~/Documents/CherryTree_Docs$ git branch -M main eric@kalin-emcwilliams:~/Documents/CherryTree_Docs$ git push -u origin main

Enumerating objects: 20, done. Counting objects: 100% (20/20), done. Delta compression using up to 16 threads Compressing objects: 100% (20/20), done. Writing objects: 100% (20/20), 158.20 KiB | 17.58 MiB/s, done. Total 20 (delta 16), reused 0 (delta 0), pack-reused 0 To gitshed.igazine.com:/home/eric/projects/git/cherrytree.git * [new branch] main → main branch 'main' set up to track 'origin/main'.

And this is my first edit after pulling the DB down to my laptop… Holy Hell it works! I just need to remember to git push from my laptop to the remote server and sync on my workstation before editing again.

I am saving these files as SQLite but I am now thinking I could do XML instead, the git merge possiblites are attractive but need to test.

technical/notes_cherrytree_git_sync.txt · Last modified: by super_stunder