第一次pull文件到自己的库中,能不能成功呢···
好想做一个自己的 blog ,今天试试吧,先使用 hexo 初始化静态网站
——成功了!操作流程:
1 2
| git init git remote add origin git@github.com:MecoloSa/MecoloSa.github.io.git
|
之后查看
1 2 3
| $ git remote -v origin https://github.com/MecoloSa/MecoloSa.github.io.git (fetch) origin https://github.com/MecoloSa/MecoloSa.github.io.git (push)
|
将 readme.md 放在文件夹后,执行
1 2
| git add . git push origin master
|
即可
出现问题:修改readme.md后无法提交
按照GPT-4提示git add -f README.md
也没有作用,提示
1 2 3
| On branch master
nothing to commit, working tree clean
|
重启git后执行
1 2 3 4 5 6 7 8 9 10 11 12 13
| git add .
git status # 可以看到更改的信息 # On branch master # Changes to be committed: # (use "git restore --staged <file>..." to unstage) # modified: readme.md
git commit -m "Update README.md" # 可以看到上传过程 # [master 225f05e] Update README.md # 1 file changed, 13 insertions(+), 2 deletions(-) git push origin master
|
此外,进行了初步博客配置探索
执行命令为:
C:\Users\PENG\Desktop\Illias_class\blog>hexo server
找到需要上传的md文件,后拉取到source文件夹,重复上述过程即可
但是,以上操作只能满足本地的静态网站,通过localhost访问,并不能部署到网页上
之后流程参见下一个 blog