git
约 195 字小于 1 分钟
2020-09-06
GitLab
| 步骤 | 命令 |
|---|---|
| 生成密钥 | ssh-keygen -t ed25519 -C "your_email@example.com" |
| github添加公钥 | # 设置 -> SSH and GPG keys -> New SSH key |
| 验证 | ssh -T github.com |
| 拉取仓库 | git clone git@github.com:用户名/仓库名.git |
| 中文路径的情况 | mklink /D "C:\靳琛.ssh" "C:\jinchenj.ssh" |
GIT
| 步骤 | 命令 |
|---|---|
| 初始化 | git init |
| 添加 | git add -A |
| 评论 | git commit -m "comment" |
| 连接 | git remote add origin https://github.com/OrthogonalAndParallel/OrthogonalAndParallel.github.io.git |
| 提交 | git push -f origin master |
常用
显示改动文件路径
# 直接进入仓库目录
cd /path/to/your/project
git show e252baa5 --name-only --oneline内存小于2g,交换分区解决
创建 -- dd if=/dev/zero of=/data/swap bs=512 count=8388616
制作 -- mkswap /data/swap
设置内涵参数 --
cat /proc/sys/vm/swappiness
sysctl -w vm.swappiness=60
启用 --
swapon /data/swap
echo “/data/swap swap swap defaults 0 0” >> /etc/fstab
验证 -- cat /proc/swaps