git实操(基础)
本文最后更新于58 天前,其中的信息可能已经过时,如有错误请发送邮件到2639131093@qq.com

面向github+hexo(博客)

产生关联

为了实现git与github关联,需要配置用户名,并指定github所对应的你的邮箱名称,配置密钥分发,实现无密码登录

基础命令


git config -l //查看所有配置
git config --system --list //查看系统配置
git config --global --list //查看用户(全局)配置

配置用户名和邮箱

git config --global user.name "你的用户名"
git config --global user.email "你的邮箱"

配置公共密钥,此密钥位于你用户目录下.ssh文件内,(linux基础,不过多介绍)

ssh-keygen -t rsa -C "你的邮箱"

测试与github连接

ssh -T git@github.com

项目挂载到github

对于hexo来说,在主题文件夹内对有应deploy上传至相对应服务器与github的代码

安装hexo-git插件

npm install hexo-deployer-git --save

修改主题文件内容, _config.yml文件内,ctrl+f搜索deploy

deploy:
  type: git
  repository: git@github.com:github用户名/仓库项目名称.git
  branch: main

branch:分支干线, (main,master)

repository 修改用户表/项目名

文末附加内容
暂无评论

发送评论 编辑评论


				
|´・ω・)ノ
ヾ(≧∇≦*)ゝ
(☆ω☆)
(╯‵□′)╯︵┴─┴
 ̄﹃ ̄
(/ω\)
∠( ᐛ 」∠)_
(๑•̀ㅁ•́ฅ)
→_→
୧(๑•̀⌄•́๑)૭
٩(ˊᗜˋ*)و
(ノ°ο°)ノ
(´இ皿இ`)
⌇●﹏●⌇
(ฅ´ω`ฅ)
(╯°A°)╯︵○○○
φ( ̄∇ ̄o)
ヾ(´・ ・`。)ノ"
( ง ᵒ̌皿ᵒ̌)ง⁼³₌₃
(ó﹏ò。)
Σ(っ °Д °;)っ
( ,,´・ω・)ノ"(´っω・`。)
╮(╯▽╰)╭
o(*////▽////*)q
>﹏<
( ๑´•ω•) "(ㆆᴗㆆ)
😂
😀
😅
😊
🙂
🙃
😌
😍
😘
😜
😝
😏
😒
🙄
😳
😡
😔
😫
😱
😭
💩
👻
🙌
🖕
👍
👫
👬
👭
🌚
🌝
🙈
💊
😶
🙏
🍦
🍉
😣
Source: github.com/k4yt3x/flowerhd
颜文字
Emoji
小恐龙
花!
上一篇
下一篇