Skip to content

For macOS users

Charles Chiu edited this page Nov 1, 2022 · 2 revisions

For video learners, here is a great video made by David Allen.

After Git is set and a private repo is created:

  1. Go to your local drive and right-click on it.

  2. You should see New Terminal at folder, click it. If you don't see this option, check this link to enable it.

  3. Type git clone [email protected]:{your-username}/{your-reponame}.git and hit enter.

  4. 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.

  5. After it's done, you should see a new folder with your repo name.

  6. Open the folder, there should have a hidden folder named .git.

  7. Copy&paste the post-commit and pre-commit in .git/hooks.

  8. Right click in .git/hooks and click New Terminal at folder, type

    chmod +x ./pre-commit && chmod +x ./post-commit

    to make those files executable by MacOS.

  9. Open Logseq and add the folder with .git as your new graph.

  10. Open Logseq > Settings > Version control > toggle on "Enable Git auto commit".

    1. 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.
  11. Type something and wait few minutes to see if what you typed has also appear in GitHub.

  12. If nothing goes wrong, you are a happy Logseq user!

💥Xcrun error:

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

Clone this wiki locally