-
解决使用Git提交代码到远程代码仓库报错问题。
问题的原因是在gtihub中创建的时候选择了生成LICENSE文件或者README文件,然后本地代码仓库中和远程代码创建不在同一个历史版本中,所以需要执行下面命令:git pull origin main --allow-unrelated-histories然后在执行下面命令推送代码:
git push -u origin main2025-12-15 00:25:48 0
-
两台服务器之间同步时间date -s "$(ssh <服务器IP> date)"
2025-11-05 01:10:08 1
-
Linux中查看内存型号信息命令 dmidecode -t memory
2025-09-16 02:21:31 0
-
如何打包本地jar到本地maven仓库,可以使用
mvn install:install-file -Dfile=<path-to-file> -DgroupId=<group-id> -DartifactId=<artifact-id> -Dversion=<new-version> -Dpackaging=<packaging>2025-08-29 14:06:43 0
-
解决autodl平台中使用conda安装依赖到系统盘导致存储空间不够问题,可以把/root/miniconda3移动到/root/autodl-tmp/miniconda3,然后创建软链接ln -s /root/autodl-tmp/miniconda3 /root/miniconda3。ln -s 第一个参数是软链接最终指向的路径,第二个参数是软链接名称。
mv /root/miniconda3 /root/autodl-tmp/miniconda3 ln -s /root/autodl-tmp/miniconda3 /root/miniconda32025-05-21 00:27:38 0
-
修改pip为国内阿里云源
pip config set global.index-url https://mirrors.aliyun.com/pypi/simple pip config set install.trusted-host mirrors.aliyun.com2025-05-14 02:28:17 1
-
Linux服务器中多线程下载
aria2c -x 16 -s 16 https://us.openslr.org/resources/28/rirs_noises.zip2025-03-19 03:35:52 0
-
打包python开发的程序为可执行程序
pyinstaller --onedir --exclude-module=faster-whisper --exclude-module=uvicorn app.py
--onedir 表示打包到一个目录中
--exclude-module 表示排除指定依赖2025-03-19 03:35:07 0
-
如何给ubuntu server扩容根目录
vgextend ubuntu-vg /dev/sdb
lvextend -L +500G /dev/mapper/ubuntu–vg-ubuntu–lv
或者:lvextend -L +100%FREE /dev/mapper/ubuntu–vg-ubuntu–lv
resize2fs /dev/mapper/ubuntu–vg-ubuntu–lv
如果是已经挂载的,需要先取消挂载
lsof /data 查看是否有进程在挂载路径中,如果有,可以kill -9 PID
umount /data2025-03-11 02:06:21 0
-
报错ping: bing.com: Temporary failure in name resolution的原因和解决方案
原因:没有配置DNS
解决方案:vim /etc/resolv.conf
添加下面内容:
nameserver 114.114.114.114
nameserver 223.5.5.52025-01-11 01:03:54 2
Hi,Friend
热爱生活,热爱程序
