Good night
pip 导出不带路径的 requirements.txtpip list --format=freeze >requirements.txtconda 导出conda list -e > requirements.txtconda导入conda install --yes --file requirements.txt
环境准备redis: https://github.com/redis/redis/archive/refs/tags/7.2.3.zip安装编译依赖apt install -y libsystemd-dev libc6-dev在redis源码目录下执行 make 检查编译环境如果报错缺失 cc 和 pkg-config, 则需要安装对应的依赖apt install pkg-config apt install gcc将redis安装到指定的目录下make PREFIX=/home/van/apps/redis install写入 service 文件[Unit] Description=Redis Server After=network.target [Service] ExecStart=/home/van/apps/redis/bin/redis-server /home/van/apps/redis/conf/redis.conf [Install] WantedBy=multi-user.target
systemd 支持普通用户定义的 unit[s] 开机启动systemctl --user status/enable/disable/start/stop/daemon-reload... xxx.timer/xxx.service...--user 不可省略,因为默认是执行 systemctl [--system],对于系统级 unit[s] 来说,不必显式添加 --system 选项用户自定义的 unit[s] 可以放置在如下四个位置/usr/lib/systemd/user:优先级最低,会被高优先级的同名 unit 覆盖~/.local/share/systemd/user/etc/systemd/user:全局共享的用户级 unit[s]~/.config/systemd/user:优先级最高PS:用户级 unit 与系统级 unit 相互独立,不能互相关联或依赖用户级 unit 运行环境用 default.target,系统级通常用 multi-user.target即使用户不登陆,其定制的服务依然会启动
仓库远程跟踪信息git fetch --pruneBranch查看本地分支和远程分支的关联关系git branch -vv 将本地分支和远程分支的关联关系git branch --set-upstream-to=origin/<branch> <local_branch>删除本地分支: 这个命令会强制删除指定的本地分支,不管该分支的改动是否已经被合并到其他分支。git branch -D branch_name这个命令会发送删除指定远程分支的请求,从而将该分支从远程仓库中删除。git push origin --delete branch_nameContent需要将新增的修改的内容添加,例如git add .暂存当前分支并切换到其他分支git stash切换到其他分支git checkout branch-name恢复暂存的分支git stash pop更新子模块当你执行 git pull 更新主仓库时,Git默认不会自动更新子模块(submodules)。为了同时更新主仓库及其子模块,你需要进行一些额外的操作。下面是一些常见的方法来确保在 git pull
一