Git

Git#

1. 同步远端放弃本地#

git fetch --all
git reset --hard origin/master
git pull 

Windows下问题#

[[Problem of Windows#Windows下Git问题]]

2. git 项目由 Ext4 -> NTFS 复制后#

文件权限发生变化, Git追踪文件权限的话会标记所有文件都需要修改 因为在Linux 下文件权限为 -rw-r--r--(所有者可读写,其他用户只读),但是Linux下挂载NTFS文件权限为 -rwxr-xr-x(所有者可读、写、执行,其他用户可读、执行)就很难受

git config core.filemode false # 关闭github监控文件权限
# git config core.filemode false --global

3. 自己的小仓库 - Gogs 简介#

Gogs (Go Git Service) 是一个用 Go 语言编写的自托管 Git 服务,类似于 GitHub Gitlab Gitee。它轻量、快速且易于安装,适合个人或小团队使用。Gogs 提供了基本的 Git 仓库管理功能,包括代码托管、问题跟踪、Pull Request 等。

源码安装#

  1. 安装依赖

    • 确保已安装 Go 语言环境(1.13 或更高版本)。
    • 安装 Git 和 MySQL/PostgreSQL/SQLite3 数据库。
  2. 下载源码

解决问题记录笔记

问题们

各种一键问题解决方案#

Windows下Git问题#

  • Linux没啥问题,但在Win下报checkout失败,路径问题
git config core.protectNTFS false

docker - supervisord 禁用日志文件或使用 logfile=/dev/stdout#

from: https://www.coder.work/article/100835 标签 docker supervisord

[supervisord]
nodaemon=true
logfile=/dev/stdout
pidfile=/var/run/supervisord.pid
childlogdir=/var/log/supervisor

当我这样做时,这个主管会崩溃,因为它无法在/dev/stdout 中寻找

如何禁用 supervisord 在我的 docker 容器中创建任何日志文件?

最佳答案

对于主主管,nodaemon 将导致日志转到 stdout

[supervisord]
nodaemon=true
logfile=/dev/null
logfile_maxbytes=0

然后将每个托管进程的日志发送到标准输出文件描述符/dev/fd/1

[program:x]
command=echo test
stdout_logfile=/dev/fd/1
stdout_logfile_maxbytes=0
redirect_stderr=true

或者,如果您希望将 stderr 保留在不同的流上:

[program:x]
command=echo test
stdout_logfile=/dev/fd/1
stdout_logfile_maxbytes=0
stderr_logfile=/dev/fd/2
stderr_logfile_maxbytes=0

关于docker - supervisord 禁用日志文件或使用 logfile=/dev/stdout,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45645758/

docker中执行sed报Device or resource busy错误的处理原因及方式 转载#

kuSorZ 博主文章分类:Linux 文章标签: docker | sed 文章分类: Docker 原文出处: https://www.cnblogs.com/xuxinkun/p/7116737.html错误现象

在docker容器中想要修改/etc/resolv.conf中的namesever,使用sed命令进行执行时遇到错误:

/ # sed -i ’s/192.168.1.1/192.168.1.254/g’ /etc/resolv.conf sed: can’t move ‘/etc/resolv.conf73UqmG’ to ‘/etc/resolv.conf’: Device or resource busy