git 查看 config 配置信息
查看代理配置1234git config http.proxygit config --local http.proxygit config --global http.proxygit config --system http.proxy
配置列表
1234git config --listgit config --local --listgit config --global --listgit config --system --list
优先级1system-》global-》local
参考https://www.cnblogs.com/merray/p/6006411.html
域名检测工具推荐
在线https://zijian.aliyun.com/
https://domaintool.cloud.tencent.com/
https://dns.google/
本地1nslookup weilining.cf
hexo 实时编辑预览插件
安装
1npm install hexo-browsersync
使用这是一个辅助插件,使用者可自由选择是否安装。
每当你 ctrl + s 保存代码时,浏览器会自动刷新,而不是手动 f5 ,并且终端和浏览器会弹出一个短暂的字幕提醒页面已修改。
卸载1npm un hexo-browsersync
参考https://github.com/hexojs/hexo-browsersync
macOS安装telnet命令
快速安装1brew install telnet
homebrew博客有提到
使用例子1telnet www.baidu.com 80
在线应急http://tool.chinaz.com/port/
mac 有效不生成.DS_Store
指定“排序方式”访达 ==》显示==》排序方式==》名称
删除之前生成的.DS_Store1sudo find / -name ".DS_Store" -depth -exec rm {} \;
参考https://www.jianshu.com/p/f49f6974f647
有效撤销 git commit
撤销commit代码1git reset --soft HEAD^
日志查询1git log
强制推送1git push origin HEAD:master --force # 推送到服务器,一定要加 --force 参数 "master":对应的分支即可
本地撤销到某个commit123git log # 1.找到想要退回到commit_idgit reset --hard commit_id # 2.本地代码变成某个提交记录时刻的代码git reset commit_id # 3.完成撤销,停留在当前版本,之前的代码还是在的。只是本地的提交记录没了
远程撤销到某个commit123git log # 1.找到想要退回到commit_idgit reset --hard commit_id # 2.本地代码变成某个提交记录时刻的代码git push origin HEAD:master --force # 3.推送到服务器,一定要加 --force 参数 "master":对应的分支即可
参考https://blog.csdn. ...
2021 Hexo Next 上手记录
依赖12git --versionnode --version
安装1npm install hexo-cli -g && hexo init blog && cd blog && npm un hexo-theme-landscape && npm i hexo-theme-next
苹果系统sudo npm install hexo-cli -g
更换默认主题_config.yml找到theme: landscape换成theme: next
预览1hexo cl && hexo s
http://localhost:4000
主题配置1curl -o _config.butterfly.yml https://cdn.jsdelivr.net/gh/next-theme/hexo-theme-next/_config.yml
参考https://github.com/next-theme/hexo-theme-next/blob/master/_config.yml
2021 Oh My Zsh 上手
安装1/bin/bash -c "$(curl -fsSL https://cdn.jsdelivr.net/gh/ohmyzsh/ohmyzsh/tools/install.sh)"
Do you want to change your default shell to zsh? [Y/n]填Y
卸载1/bin/bash -c "$(curl -fsSL https://cdn.jsdelivr.net/gh/ohmyzsh/ohmyzsh/tools/uninstall.sh)"
改变默认的shell1chsh -s /bin/zsh
重新启动终端即可。
从 zsh 切换回 bash1chsh -s /bin/bash
查看当前使用的shell系统默认
1echo $SHELL
官网https://github.com/ohmyzsh/ohmyzsh
2021 iterm2 上手
官网下载https://iterm2.com/downloads.html
我用这个https://iterm2.com/downloads/stable/iTerm2-3_4_3.zip
Mac使用iterm2的理由大家都知道Visual Studio Code分屏操作是command + 2,两个框独立;而Mac的terminal.app的拆分面板是command + D,两个框完全同步操作
软件名称
分屏独立操作
terminal.app
否
iterm.app
是
brew Error:homebrew-core is a shallow clone.解决办法
问题1/bin/bash -c "$(curl -fsSL https://cdn.jsdelivr.net/gh/Homebrew/install/install.sh)"
安装完成或者brew update出现下面错误提示
1234Error: homebrew-core is a shallow clone.To `brew update`, first run: git -C /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core fetch --unshallow
解决办法1234567cd "$(brew --repo)/Library/Taps/"rm -rf homebrewmkdir homebrewcd homebrewgit clone git://mirrors.ustc.edu.cn/homebrew-core.gitcd "$(brew --repo)/Library/Taps/homebrew/homebrew-core"git r ...