清除 Git 仓库的所有提交记录,成为一个新的干净仓库
摘要:切换到新的分支 git checkout --orphan latest_branch 缓存所有文件(除了.gitignore中声明排除的) git add -A 提交跟踪过的文件 git commit -am "first commit" 删除 main 分支 git branch -D main
阅读全文
posted @
2022-01-25 11:31
青叶煮酒
阅读(82)
推荐(0) 编辑
C# 调用 Linux 系统命令
摘要:示例代码如下: string chmodCmdStr = "chmod +x ./AEConsole_GatewayService"; Process process = new Process(); process.StartInfo.UseShellExecute = false; proces
阅读全文
posted @
2022-01-21 13:24
青叶煮酒
阅读(2177)
推荐(1) 编辑
C# 判断操作系统是 Windows 还是 Linux
摘要:示例代码如下: if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) { // Windows 相关逻辑 } else if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux)) { //
阅读全文
posted @
2022-01-11 11:08
青叶煮酒
阅读(3390)
推荐(1) 编辑