3.6 KiB
Resources:
- Follow the instructions here and document as you go:
- Refer back to plists for a better understanding of implementation and usage.
- on Cron: https://osxdaily.com/2020/04/27/fix-cron-permissions-macos-full-disk-access/
- apparently the extension Obsidian-Git already does this in an easier way now
- So this is how you push it to your gitlab
- Refer to the Git page on here for more shortcuts.
Syncing my Obsidian: The Steps I took
My Obsidian files are all stored within Google Drive. So in order to maintain sync while still preserving cloud storage space, I used a few different steps than the guides, and well really it was a culmination of it all.
- **Find your Google Drive location and copy the directory path.
pwd | pbcopy
- Go to your local projects folder and
git init
there locally.
mkdir gitlab_sync
cd gitlab_sync
git init
git branch -m main
#renamed branch to main insted of master
#less typing xD
- Then create a bare clone copy into your copied google drive location.
git clone --bare . ~user/Google\ Drive/My\ Drive/folder/location.git
- Then go ahead and make a new remote using this git path inside your local directory.
git remote add NameOfRemote ~user/Google\ Drive/My\ Drive/folder/location.git
- Make some changes to your git repository by adding files and commit those changes.
**git** add LICENSE.md
**git** commit -m 'Initial sync version'
- Then I pushed the changes to the remote google drive location.
git push -u origin main
Pushing to Gitlab
- Next, I added the (SSH) remote of the gitlab server to upload to as well.
git remote add NameofRemote git@gitblah.com:user/repo.git
- I then created another branch for the upload sync to take place.
git branch AnotherBranch
git checkout AnotherBranch #switch into it
-
Then follow the instructions outlined on this article. Basically you then create a git clone of it in your new directory by
git clone --bare . PATH_TO_GOOGLE_DRIVE_SYNC_FOLDER/ANY_SUBFOLDER_PATH/PROJECT_NAME.git
-
Then do a git remote by
git remote add REMOTE_NAME PATH_TO_GOOGLE_DRIVE_SYNC_FOLDER/ANY_SUBFOLDER_PATH/PROJECT_NAME.git
-
Add files to stage for commit and commit a message.
git add .
git commit -m "an update message here"
- Lastly, push the changes onto your quantum programming repo.
git push -u origin main
Voila! You should see the changes now over here. Or wherever you decided to set up host the git remote server on.
Syncing via Gitea Server
This can be done locally or via Google Drive. Go to the folder that you'd like to start the git syncing on and run:
git init
This sets up the git process. Next you have to clone the existing repository and pull .
git clone http://172.104.8.87:3000/shway/Notepad.git
And then pull the existing information from the repo.
git pull