Supermemo backup using Git: Difference between revisions
Jump to navigation
Jump to search
mNo edit summary |
mNo edit summary |
||
Line 1: | Line 1: | ||
== Seting up a Git backup using Gitlab== | |||
<youtube>jof8hAk4Ppc</youtube> | |||
I storngly discourage naming the files "pull.bat" and "push.bat" as both will be next to each other, increasing the chances to missclick leading to potential local deletions. | I storngly discourage naming the files "pull.bat" and "push.bat" as both will be next to each other, increasing the chances to missclick leading to potential local deletions. | ||
=== Synching made with current computer i.e. updating backup === | |||
'''sm-push.bat''' to sync your changes to the cloud | '''sm-push.bat''' to sync your changes to the cloud | ||
Line 6: | Line 13: | ||
git push | git push | ||
</pre> | </pre> | ||
<youtube>WAlsBrWk--c</youtube> | |||
=== Synching changes made from another computer === | |||
'''pull-sm.bat''' to get the cloud version to your computer. | '''pull-sm.bat''' to get the cloud version to your computer. | ||
<pre> | <pre> | ||
git pull | git pull | ||
</pre> | </pre> | ||
<youtube>qQfbUoZxMXc</youtube> | |||
=== Resolving conficts === | |||
'''resolve-conflicts''' neded when different computers used SuperMemo asynchronously. | '''resolve-conflicts''' neded when different computers used SuperMemo asynchronously. | ||
<pre> | <pre> | ||
Line 20: | Line 32: | ||
git checkout main | git checkout main | ||
</pre> | </pre> | ||
Video guide | |||
<youtube>jof8hAk4Ppc</youtube> |
Revision as of 16:59, 26 August 2021
Seting up a Git backup using Gitlab
I storngly discourage naming the files "pull.bat" and "push.bat" as both will be next to each other, increasing the chances to missclick leading to potential local deletions.
Synching made with current computer i.e. updating backup
sm-push.bat to sync your changes to the cloud
git add -A && git commit -m "Update" git push
Synching changes made from another computer
pull-sm.bat to get the cloud version to your computer.
git pull
Resolving conficts
resolve-conflicts neded when different computers used SuperMemo asynchronously.
git reset --hard git checkout -b temp git branch -D main git fetch git checkout main
Video guide