├── .github └── workflows │ └── release.yml ├── .gitignore ├── CHANGELOG.md ├── LICENSE ├── README.md ├── demo.gif ├── demo.png ├── index.html ├── logo.png ├── package.json ├── pnpm-lock.yaml ├── postcss.config.js ├── release.config.js ├── src ├── App.css ├── App.tsx ├── favicon.svg ├── helper │ ├── constants.ts │ ├── git.ts │ └── util.ts ├── index.css ├── main.tsx └── vite-env.d.ts ├── tailwind.config.js ├── tsconfig.json ├── vite.config.ts └── yarn.lock /.github/workflows/release.yml: -------------------------------------------------------------------------------- 1 | name: Release 2 | on: 3 | push: 4 | branches: 5 | - main 6 | jobs: 7 | release: 8 | name: Release 9 | runs-on: ubuntu-20.04 10 | steps: 11 | - name: Checkout 12 | uses: actions/checkout@v3 13 | with: 14 | fetch-depth: 0 15 | 16 | - name: Setup Node.js 17 | uses: actions/setup-node@v3 18 | with: 19 | node-version: 18 20 | 21 | - name: Install pnpm 22 | uses: pnpm/action-setup@v2 23 | with: 24 | version: 8 25 | run_install: false 26 | 27 | - name: Install dependencies 28 | run: pnpm install 29 | 30 | - name: Build 31 | run: pnpm build 32 | 33 | - name: Release 34 | env: 35 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 36 | run: npx semantic-release -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | .DS_Store 3 | dist 4 | dist-ssr 5 | *.local 6 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # [1.7.0](https://github.com/haydenull/logseq-plugin-git/compare/v1.6.0...v1.7.0) (2024-05-21) 2 | 3 | 4 | ### Features 5 | 6 | * Added Custom Commit Message ([#60](https://github.com/haydenull/logseq-plugin-git/issues/60)) ([3773f8b](https://github.com/haydenull/logseq-plugin-git/commit/3773f8bbcf5a1004fa93d8af6c043c62a4104d9e)) 7 | 8 | # [1.6.0](https://github.com/haydenull/logseq-plugin-git/compare/v1.5.5...v1.6.0) (2024-05-21) 9 | 10 | 11 | ### Bug Fixes 12 | 13 | * :bug: release action error ([52d170b](https://github.com/haydenull/logseq-plugin-git/commit/52d170b88f4f1edb28810fe26a501978b0cfde6b)) 14 | 15 | 16 | ### Features 17 | 18 | * New keyboard shortcut to commit without pushing ([#59](https://github.com/haydenull/logseq-plugin-git/issues/59)) ([fc799b8](https://github.com/haydenull/logseq-plugin-git/commit/fc799b8a8a364487db5c44631d3982323343926d)) 19 | 20 | ## [1.5.5](https://github.com/haydenull/logseq-plugin-git/compare/v1.5.4...v1.5.5) (2023-12-28) 21 | 22 | 23 | ### Bug Fixes 24 | 25 | * patch git exec command ([#50](https://github.com/haydenull/logseq-plugin-git/issues/50)) ([b4a4229](https://github.com/haydenull/logseq-plugin-git/commit/b4a422930288ff32cf2ff2fd23a71f0ca862b606)) 26 | 27 | ## [1.5.4](https://github.com/haydenull/logseq-plugin-git/compare/v1.5.3...v1.5.4) (2023-07-27) 28 | 29 | 30 | ### Bug Fixes 31 | 32 | * exported inProcess() was not set correctly breaking checkIsSynced ([#37](https://github.com/haydenull/logseq-plugin-git/issues/37)) ([cf78518](https://github.com/haydenull/logseq-plugin-git/commit/cf785180e4f68e589a153b71056a2fe1163fade6)) 33 | 34 | ## [1.5.3](https://github.com/haydenull/logseq-plugin-git/compare/v1.5.2...v1.5.3) (2023-07-26) 35 | 36 | 37 | ### Bug Fixes 38 | 39 | * [#30](https://github.com/haydenull/logseq-plugin-git/issues/30), shortcut mod+alt+s will pull rebase ([5f42bd5](https://github.com/haydenull/logseq-plugin-git/commit/5f42bd5674cdcdff6ae60e789ddf9bc66223ed38)) 40 | * stack git operations not to get errors when auto actions are already performing ([e78bb2c](https://github.com/haydenull/logseq-plugin-git/commit/e78bb2c185787e731cb7b1af07487b6901389396)), closes [#34](https://github.com/haydenull/logseq-plugin-git/issues/34) 41 | 42 | ## [1.5.2](https://github.com/haydenull/logseq-plugin-git/compare/v1.5.1...v1.5.2) (2023-04-20) 43 | 44 | 45 | ### Bug Fixes 46 | 47 | * :bug: the mask was not turned off after initilization ([a84acb5](https://github.com/haydenull/logseq-plugin-git/commit/a84acb5a7133da1f0693c15112ab5c903f0a1774)) 48 | 49 | ## [1.5.1](https://github.com/haydenull/logseq-plugin-git/compare/v1.5.0...v1.5.1) (2023-04-16) 50 | 51 | 52 | ### Bug Fixes 53 | 54 | * In the Logseq 0.9.2 version, there is an issue with the panel display that needs to be fixed. ([a81bceb](https://github.com/haydenull/logseq-plugin-git/commit/a81bceb10996a6e3d3901fe1f1fef63d6d1c4052)) 55 | 56 | # [1.5.0](https://github.com/haydenull/logseq-plugin-git/compare/v1.4.2...v1.5.0) (2023-02-14) 57 | 58 | 59 | ### Features 60 | 61 | * logseq sdk version ([#26](https://github.com/haydenull/logseq-plugin-git/issues/26)) ([d616d82](https://github.com/haydenull/logseq-plugin-git/commit/d616d820df800809cdc37e718fa0a43ff380498b)) 62 | 63 | ## [1.4.2](https://github.com/haydenull/logseq-plugin-git/compare/v1.4.1...v1.4.2) (2022-11-06) 64 | 65 | 66 | ### Bug Fixes 67 | 68 | * button color ([d3a5bd1](https://github.com/haydenull/logseq-plugin-git/commit/d3a5bd169ee74634983c04f160677a9f34f8971e)) 69 | 70 | ## [1.4.1](https://github.com/haydenull/logseq-plugin-git/compare/v1.4.0...v1.4.1) (2022-11-01) 71 | 72 | 73 | ### Bug Fixes 74 | 75 | * button style ([d32ef80](https://github.com/haydenull/logseq-plugin-git/commit/d32ef80c2105b3d7fb14da9b813c2eb29b7d3045)) 76 | 77 | # [1.4.0](https://github.com/haydenull/logseq-plugin-git/compare/v1.3.0...v1.4.0) (2022-08-23) 78 | 79 | 80 | ### Features 81 | 82 | * ✨ Support for turning off auto-check sync ([a2ac2bd](https://github.com/haydenull/logseq-plugin-git/commit/a2ac2bd44cd9685c15827bdb82bdec6c18139823)) 83 | 84 | # [1.3.0](https://github.com/haydenull/logseq-plugin-git/compare/v1.2.0...v1.3.0) (2022-08-19) 85 | 86 | 87 | ### Features 88 | 89 | * add default value: pull rebase ([90862ba](https://github.com/haydenull/logseq-plugin-git/commit/90862ba1d2d0d258c6d7b7a58f552fb0187f2df9)) 90 | 91 | # [1.2.0](https://github.com/haydenull/logseq-plugin-git/compare/v1.1.0...v1.2.0) (2022-06-11) 92 | 93 | 94 | ### Features 95 | 96 | * supports disable checkWhenDBChanged ([85428aa](https://github.com/haydenull/logseq-plugin-git/commit/85428aa217361a797f64c5eadd8a008e39cb49b2)) 97 | 98 | # [1.1.0](https://github.com/haydenull/logseq-plugin-git/compare/v1.0.2...v1.1.0) (2022-05-22) 99 | 100 | 101 | ### Features 102 | 103 | * ✨ add pull and checkout buttons ([f950626](https://github.com/haydenull/logseq-plugin-git/commit/f950626e2a3776c805a96267bbd37ba7a7eae9da)) 104 | 105 | ## [1.0.2](https://github.com/haydenull/logseq-plugin-git/compare/v1.0.1...v1.0.2) (2022-05-20) 106 | 107 | 108 | ### Bug Fixes 109 | 110 | * The id does not match expectations ([dffcaa3](https://github.com/haydenull/logseq-plugin-git/commit/dffcaa3b71086bad022350494c841bed7576d9c3)) 111 | 112 | ## [1.0.1](https://github.com/haydenull/logseq-plugin-git/compare/v1.0.0...v1.0.1) (2022-05-05) 113 | 114 | 115 | ### Bug Fixes 116 | 117 | * 🐛 Adapt logseq 0.6.7 ([02ffdf7](https://github.com/haydenull/logseq-plugin-git/commit/02ffdf70d493f0adc70d95d4847a7bb6ed6751b7)) 118 | * default value error[skip ci] ([a5cfc2b](https://github.com/haydenull/logseq-plugin-git/commit/a5cfc2b9184119f820946fcb0d33f5e5dc098e5d)) 119 | 120 | # 1.0.0 (2022-04-08) 121 | 122 | 123 | ### Features 124 | 125 | * ✨ add icon ([0f52416](https://github.com/haydenull/logseq-plugin-git/commit/0f52416ef8594525fb2fb527bc05c98fa327e308)) 126 | 127 | # [1.1.0](https://github.com/haydenull/logseq-plugin-git/compare/v1.0.0...v1.1.0) (2022-03-08) 128 | 129 | 130 | ### Features 131 | 132 | * add antd ([036577d](https://github.com/haydenull/logseq-plugin-git/commit/036577dc529db4e4a5964c287a55d112bae654bc)) 133 | 134 | # 1.0.0 (2022-01-18) 135 | 136 | 137 | ### Features 138 | 139 | * ✨ initial commit ([cca0e7f](https://github.com/haydenull/logseq-plugin-git/commit/cca0e7fcba33830eaf534fd9ca6b867b57147de4)) 140 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2022 Hayden Chen 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # logseq-plugin-git 2 | > git plugin for logseq 3 | 4 | [](https://github.com/haydenull/logseq-plugin-git/releases) 5 | [](https://github.com/haydenull/logseq-plugin-git/blob/main/LICENSE) 6 | 7 | Logseq Git Plugin is a plugin for Logseq that provides easy access to common git commands, and helps you keep your notes synchronized with a remote git repository. 8 | 9 | With this plugin, you can: 10 | 11 | - Know explicitly if there are unsaved notes in the current repository and if they are synchronized with the remote repository. When there are unsaved files locally, the plugin will show a red indicator in the toolbar icon. 12 | - Quickly commit changes to notes. The plugin provides shortcut keys (mod+s) to perform commit&push operations. 13 | - Provide buttons to quickly execute common commands. Click the plugin icon, and the drop-down menu will show you some buttons to help you quickly execute commands (you can specify the desired buttons in the settings). 14 | - Prompt you if you have synchronized with the remote repository. The plugin automatically detects if the current repository is up-to-date and prompts when logseq starts and other times. 15 | 16 | ## Installation 17 | 18 | Install from the Logseq Plugin Store 19 | 20 | ## Shortcuts 21 | The plugin provides a shortcut key (mod+s) to quickly commit and push changes to the remote repository. 22 | 23 | ## Toolbar Icon 24 | 25 | - icon: everything is up-to-date. 26 | - icon with red dot: there are unsaved files locally. 27 | - icon with blinking red dot: the plugin is committing or pushing changes to the remote repository. 28 | 29 | ## Commands 30 | 31 | The drop-down menu shows the following commands: 32 | - Check Status: check the status of the current repository. 33 | - Show Log: show the log of the current repository. 34 | - Pull: pull changes from the remote repository. 35 | - Pull Rebase: pull changes from the remote repository and rebase. 36 | - Commit: commit changes to the current repository. 37 | - Push: push changes to the remote repository. 38 | - Commit & Push: commit changes and push to the remote repository. 39 | 40 | ## Demo 41 |  42 | 43 | -------------------------------------------------------------------------------- /demo.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haydenull/logseq-plugin-git/e0ae1958ab583595d106bccd07b91bfd8a69ea61/demo.gif -------------------------------------------------------------------------------- /demo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haydenull/logseq-plugin-git/e0ae1958ab583595d106bccd07b91bfd8a69ea61/demo.png -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 5 | 6 | 7 |