笔记笔记
  • Home
  • AI&ML
  • Example
  • Zoo
  • 关于
⌘ K
目录
灵感
统一资源标识符
画图工具
收藏的正则表达式
灰度站点
LaTeX
DNS
下载 WWDC 字幕
暂存
工具
工具
服务器软件
MinIO
Shell 软件
Git
ImageMagick
MyCLI
MySQL
桌面软件
Chrome
DataGrip
IntelliJ IDEA 技巧
最后更新时间:
Copyright © 2023-2024 | Powered by dumi | GuoDapeng | 冀ICP备20004032号-1 | 冀公网安备 冀公网安备 13024002000293号

TABLE OF CONTENTS

‌
‌
‌
‌

Git

常用命令

# 回退一个版本但是保留文件更改,可以使用HEAD~1表示上一个版本
git reset --soft HEAD~1
# 停止追踪这个目录的文件
git rm -r --cached .idea/

SSH 密钥

# 生成 ssh 密钥
ssh-keygen -t rsa -C example@example.com
# 查看公钥
cat ~/.ssh/id_rsa.pub
# 测试 ssh 连接
ssh -T git@ssh.host_example.com -p 8022
# 看到下面输出就是成功了
# Welcome to GitLab, @GuoDapeng!
# 克隆仓库
git clone ssh://git@ssh.host_example.com:8022/GuoDapeng/doc.git

~/.ssh 这里 id_rsa.pub 是公钥, id_rsa 是私钥。