1 win下编译mindoc

修改conf里
注释掉mysql
取消sqlite注释
拷贝一个sqlite数据库到database文件夹里,更名为mindoc.db
cmd进入mindoc文件夹
因为用sqlite需要cgo,go env -w CGO_ENABLED=1
https://blog.csdn.net/qq_43625649/article/details/134488353

D:\gowork>cd src\github.com\mindoc
D:\gowork\src\github.com\mindoc>bee run

2 Fork 这个项目

3 Clone 已经 fork 的项目

当你 fork 一个项目之后,你需要把它克隆到你的电脑上,这样你才能开始工作。

要 clone 这个项目,你先打开你自己的 GitHub 主页,找到 fork 过来的项目,打开后点击右上角的 “Clone or download” 按钮,得到复制的地址。

GitHub 为克隆项目提供了两种传输协议: HTTPS 和 SSH 。关于这个主题的更多内容可以看这里。这里假设你决定使用 HTTPS 。

当你复制了项目 URL,你可以在 Git 客户端或者 shell 里 clone 项目:

$ git clone https://github.com/mindoc-org/mindoc.git
Clone 一个项目会在你的硬盘上创建一个文件夹,里面有项目的所有文件,还有跟踪文件变化的 git 文件夹。

4 设置克隆过来的项目

进入克隆过来的项目文件夹,将原来项目的 URL 添加到你的本地代码仓库,这样你就可以随时从原来的项目 pull 最新的修改:

$ git remote add upstream url
我用 upstream (上游) 作为远程仓库的名字,这是 GitHub 的风格,但是你可以用任何名字。

现在远程仓库列表是这样的:

Administrator@DESK-XDIGIWSFLS MINGW64 /d/gowork/src/github.com/mindoc (master)
$ git remote add upstream https://github.com/mindoc-org/mindoc.git

Administrator@DESK-XDIGIWSFLS MINGW64 /d/gowork/src/github.com/mindoc (master)
$ git remote -v
origin https://github.com/engineercms/mindoc.git (fetch)
origin https://github.com/engineercms/mindoc.git (push)
upstream https://github.com/mindoc-org/mindoc.git (fetch)
upstream https://github.com/mindoc-org/mindoc.git (push)

这里创建了一个叫做upstream的与源代码origin关联,关联之后,就可以同步源代码库的其他分支到自己的仓库了
在你把自己的修改 push 到你的 fork 之前,从上游拉回一次新的变动。

Administrator@DESK-XDIGIWSFLS MINGW64 /d/gowork/src/github.com/mindoc (master)
$ git fetch upstream master
From https://github.com/mindoc-org/mindoc

  • branch master -> FETCH_HEAD
  • [new branch] master -> upstream/master

Administrator@DESK-XDIGIWSFLS MINGW64 /d/gowork/src/github.com/mindoc (master)
$ git pull upstream master
From https://github.com/mindoc-org/mindoc

  • branch master -> FETCH_HEAD
    Already up to date.

5 推送

Administrator@DESK-XDIGIWSFLS MINGW64 /d/gowork/src/github.com/mindoc (master)
$ git add .
warning: in the working copy of ‘conf/app.conf.example’, LF will be replaced by CRLF the next time Git touches it

Administrator@DESK-XDIGIWSFLS MINGW64 /d/gowork/src/github.com/mindoc (master)
$ git commit -m “add prev&next in default read.tpl”
[master 2988fab] add prev&next in default read.tpl
11 files changed, 1776 insertions(+), 95 deletions(-)
create mode 100644 conf/app.conf.example
delete mode 100644 uploads/202404/cover_17c7b2c6745688e0.png
create mode 100644 uploads/202404/cover_17c8260e47e06f18_small.png
create mode 100644 uploads/202404/cover_17c8286be57a8600_small.png
create mode 100644 uploads/202404/cover_17c829abdef5fdc8.png
create mode 100644 uploads/books/2/book.zip
create mode 100644 views/document/test.tpl
delete mode 100644 “win\344\270\213\347\274\226\350\257\221.md”

Administrator@DESK-XDIGIWSFLS MINGW64 /d/gowork/src/github.com/mindoc (master)
$ git push
warning: —————– SECURITY WARNING —————-
warning: | TLS certificate verification has been disabled! |
warning: —————————————————
warning: HTTPS connections may not be secure. See https://aka.ms/gcm/tlsverify for more information.
warning: —————– SECURITY WARNING —————-
warning: | TLS certificate verification has been disabled! |
warning: —————————————————
warning: HTTPS connections may not be secure. See https://aka.ms/gcm/tlsverify for more information.
Enumerating objects: 33, done.
Counting objects: 100% (33/33), done.
Delta compression using up to 20 threads
Compressing objects: 100% (19/19), done.
Writing objects: 100% (21/21), 249.03 KiB | 27.67 MiB/s, done.
Total 21 (delta 11), reused 0 (delta 0), pack-reused 0
remote: Resolving deltas: 100% (11/11), completed with 11 local objects.
To https://github.com/engineercms/mindoc.git
6054b5f..2988fab master -> master

上一篇:
下一篇: