-
Notifications
You must be signed in to change notification settings - Fork 95
For macOS users
After Git is set and a private repo is created:
-
Go to your local drive and right-click on it.
-
You should see
New Terminal at folder
, click it. If you don't see this option, check this link to enable it. -
Type
git clone [email protected]:{your-username}/{your-reponame}.git
and hit enter. -
If it's your first time git clone something from GitHub, it will probably ask if you agree to authorized the connection, just type
Yes
and hit enter. -
After it's done, you should see a new folder with your repo name.
-
Open the folder, there should have a hidden folder named
.git
. -
Copy&paste the
post-commit
andpre-commit
in.git/hooks
. -
Right click in
.git/hooks
and clickNew Terminal at folder
, typechmod +x ./pre-commit && chmod +x ./post-commit
to make those files executable by MacOS.
-
Open Logseq and add the folder with
.git
as your new graph. -
Open Logseq > Settings > Version control > toggle on "Enable Git auto commit".
- If you don't want auto-commit to commit in the middle of writing, you can use the git-plugin by haydenull to commit manually by yourself.
-
Type something and wait few minutes to see if what you typed has also appear in GitHub.
-
If nothing goes wrong, you are a happy Logseq user!
xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
Update Xcode Command Line Tools: xcode-select --install
, ref